NFunctions.Azure
0.0.1-preview
dotnet add package NFunctions.Azure --version 0.0.1-preview
NuGet\Install-Package NFunctions.Azure -Version 0.0.1-preview
<PackageReference Include="NFunctions.Azure" Version="0.0.1-preview" />
paket add NFunctions.Azure --version 0.0.1-preview
#r "nuget: NFunctions.Azure, 0.0.1-preview"
// Install NFunctions.Azure as a Cake Addin #addin nuget:?package=NFunctions.Azure&version=0.0.1-preview&prerelease // Install NFunctions.Azure as a Cake Tool #tool nuget:?package=NFunctions.Azure&version=0.0.1-preview&prerelease
NFunctions (alpha)
NFunctions is a C# open source serverless function framework that aims to free your code from AWS Lambda or Azure Functions boilerplate code while still leveraging those FaaS services.
You just use NFunctions agnostic attributes to tag your function handler methods and define their triggers.
NFunctions source generator then automatically generates the AWS Lambda or Azure boilerplate code for you based
on the NFunctions cloud provider NuGet package you've added to your project: NFunctions.AWS
or NFunctions.Azure
.
A typical NFunctions handler method looks like the below code. The NFunctions
attribute tags your method
as a function handler method. You can pass the name of the function to attribute. The HttpTrigger
attribute
defines that the function exectution is triggered by a GET http request.
public class NFunctionsOnAWSLambda
{
[NFunctions("Get")]
[HttpTrigger(NFunctions.Http.HttpMethod.GET, "api")]
public HttpTriggerReponse MyFirstFunction(IHttpTriggerRequest request)
{
return new HttpTriggerReponse(System.Net.HttpStatusCode.OK, "Hello from NFunction");
}
}
Samples
In the samples
folder, you have two sample projects that showcase that the same source code can be deployed
seamlessly on AWS or Azure. You just have to open the NFunctionsSamples
solution and build the projects.
If you use Visual Studio 2022, you can use the AWS Toolkit extension to deploy on AWS or the built-in Azure
tooling to deploy on Azure.
Source code
In the src
folder, you have the NFunctions
solution that you can use to explore and build the NFunctions
NuGet packages.
Project status
This project is in its early stage. It aims at exploring the art of possible to abstract your serverless function code away from AWS Lambda and Azure Functions without sacrifiying to Kubernetes.
How to provide feedback
We are looking for feedback. Please, open an issue to record your feedback in our GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- NFunctions (>= 0.0.1-preview)
-
net8.0
- NFunctions (>= 0.0.1-preview)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.1-preview | 49 | 9/26/2024 |