├── python
├── tests
│ ├── src
│ │ ├── __init__.py
│ │ ├── sub_mod
│ │ │ ├── __init__.py
│ │ │ └── altmain.py
│ │ ├── foo.py
│ │ └── main.py
│ ├── websocket_test.sh
│ └── local_test.sh
├── examples
│ ├── multifile
│ │ ├── __init__.py
│ │ ├── message.txt
│ │ ├── readfile.py
│ │ ├── main.py
│ │ └── README.md
│ ├── sourcepkg
│ │ ├── __init__.py
│ │ ├── requirements.txt
│ │ ├── build.sh
│ │ └── user.py
│ ├── hello.py
│ ├── statuscode.py
│ ├── requestdata.py
│ ├── websocket
│ │ └── main.py
│ ├── guestbook
│ │ ├── add.py
│ │ ├── deploy.sh
│ │ ├── redis.yaml
│ │ └── get.py
│ └── README.md
├── Makefile
├── builder
│ ├── Makefile
│ ├── defaultBuildCmd
│ └── Dockerfile
├── Dockerfile
├── Dockerfile-buster
├── requirements.txt
└── envconfig.json
├── dotnet20
├── .dockerignore
├── project-build.sh
├── Makefile
├── builder
│ ├── Makefile
│ ├── Model
│ │ ├── ExcludeDll.cs
│ │ ├── IncludeNuget.cs
│ │ ├── BuilderSettings.cs
│ │ └── FunctionSpecification.cs
│ ├── builderSettings.json
│ ├── Utility
│ │ ├── BuilderExtensions.cs
│ │ └── ObjectConverter.cs
│ ├── build.sh
│ ├── Dockerfile
│ ├── nugetSettings.json
│ ├── Builder.sln
│ ├── log4net.config
│ └── Builder.csproj
├── envsettings.json
├── examples
│ ├── helloworld.cs
│ ├── echo.cs
│ ├── arguments.cs
│ ├── requestheaders.cs
│ └── requestbody.cs
├── Dockerfile
├── Model
│ ├── DllInfo.cs
│ ├── EnvironmentSettings.cs
│ ├── BuilderRequest.cs
│ └── FunctionSpecification.cs
├── Program.cs
├── Function.cs
├── Utility
│ ├── ObjectConverter.cs
│ └── EnvironmentExtension.cs
├── envconfig.json
├── dotnet20.sln
└── fission-dotnet20.csproj
├── nodejs
├── .gitignore
├── test
│ ├── package.json
│ ├── test-case-5
│ │ ├── package.json
│ │ └── helloWorld.js
│ ├── test-case-6
│ │ ├── package.json
│ │ └── helloUser.js
│ ├── test-case-7
│ │ ├── package.json
│ │ └── wordCount.js
│ ├── test-case-1
│ │ └── helloWorld.js
│ ├── test.js
│ ├── test-case-2
│ │ └── helloUser.js
│ ├── test-case-4
│ │ ├── package.json
│ │ ├── momentExample.js
│ │ └── package-lock.json
│ ├── test-case-8
│ │ ├── package.json
│ │ ├── momentExample.js
│ │ └── package-lock.json
│ └── test-case-3
│ │ └── wordCount.js
├── examples
│ ├── index.js
│ ├── hello-callback.js
│ ├── echo.js
│ ├── hello.js
│ ├── broadcast.js
│ ├── multi-entry.js
│ ├── hello-esm.js
│ ├── package.json
│ ├── weather.js
│ └── multi-entry-esm.js
├── builder
│ ├── build.sh
│ ├── Dockerfile
│ └── Makefile
├── Dockerfile
├── Makefile
└── package.json
├── python-fastapi
├── tests
│ ├── src
│ │ ├── __init__.py
│ │ ├── sub_mod
│ │ │ ├── __init__.py
│ │ │ └── altmain.py
│ │ ├── foo.py
│ │ └── main.py
│ └── local_test.sh
├── examples
│ ├── multifile
│ │ ├── __init__.py
│ │ ├── message.txt
│ │ ├── readfile.py
│ │ ├── main.py
│ │ └── README.md
│ ├── sourcepkg
│ │ ├── __init__.py
│ │ ├── requirements.txt
│ │ ├── build.sh
│ │ └── user.py
│ ├── guestbook
│ │ ├── requirements.txt
│ │ ├── build.sh
│ │ ├── add.py
│ │ ├── redis.yaml
│ │ ├── deploy.sh
│ │ └── get.py
│ ├── statuscode.py
│ ├── hello.py
│ ├── requestdata.py
│ └── README.md
├── requirements.txt
├── Makefile
├── builder
│ ├── defaultBuildCmd
│ ├── Makefile
│ └── Dockerfile
├── Dockerfile
└── envconfig.json
├── jvm-jersey
├── .gitignore
├── examples
│ └── java
│ │ ├── .gitignore
│ │ ├── build.sh
│ │ ├── specs
│ │ ├── fission-deployment-config.yaml
│ │ ├── env-java.yaml
│ │ ├── package-hellojava.yaml
│ │ └── function-hello.yaml
│ │ └── src
│ │ ├── test
│ │ └── java
│ │ │ └── io
│ │ │ └── fission
│ │ │ └── HelloWorldTest.java
│ │ └── main
│ │ └── java
│ │ └── io
│ │ └── fission
│ │ └── HelloWorld.java
├── Makefile
├── builder
│ ├── build.sh
│ ├── Makefile
│ └── Dockerfile
├── Dockerfile
├── src
│ └── main
│ │ └── java
│ │ └── io
│ │ └── fission
│ │ ├── FunctionLoadRequest.java
│ │ └── Main.java
└── envconfig.json
├── binary
├── examples
│ ├── headers.sh
│ ├── hello.sh
│ ├── echo.sh
│ ├── hello.go
│ └── module-example
│ │ └── test.sh
├── builder
│ ├── Makefile
│ ├── Dockerfile
│ └── build.sh
├── Makefile
├── Dockerfile
├── envconfig.json
├── env.go
└── test
│ └── local_test.sh
├── php7
├── examples
│ ├── multifile
│ │ ├── handlers
│ │ │ ├── message.txt
│ │ │ └── FileReader.php
│ │ ├── composer.json
│ │ └── README.md
│ ├── hello.php
│ ├── hellopsr.php
│ └── stock.php
├── Makefile
├── builder
│ ├── Makefile
│ ├── defaultBuildCmd
│ └── Dockerfile
├── composer.json
├── envconfig.json
├── Dockerfile
└── README.md
├── jvm
├── examples
│ └── java
│ │ ├── .gitignore
│ │ ├── build.sh
│ │ ├── specs
│ │ ├── fission-deployment-config.yaml
│ │ ├── env-java.yaml
│ │ ├── package-hellojava.yaml
│ │ └── function-hello.yaml
│ │ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── io
│ │ │ └── fission
│ │ │ └── HelloWorld.java
│ │ └── test
│ │ └── java
│ │ └── io
│ │ └── fission
│ │ └── HelloWorldTest.java
├── .gitignore
├── Makefile
├── builder
│ ├── Makefile
│ ├── build.sh
│ └── Dockerfile
├── Dockerfile
├── src
│ └── main
│ │ └── java
│ │ └── io
│ │ └── fission
│ │ └── FunctionLoadRequest.java
├── envconfig.json
└── pom.xml
├── dotnet
├── .gitignore
├── project-build.sh
├── Makefile
├── examples
│ ├── helloworld.cs
│ ├── arguments.cs
│ ├── requestheaders.cs
│ └── requestbody.cs
├── Dockerfile
├── Program.cs
├── Function.cs
├── envconfig.json
└── fission-dotnet.csproj
├── tensorflow-serving
├── examples
│ ├── half_plus_two
│ │ └── 00000123
│ │ │ ├── variables
│ │ │ ├── variables.data-00000-of-00001
│ │ │ └── variables.index
│ │ │ └── saved_model.pb
│ └── README.md
├── Makefile
├── Dockerfile
├── envconfig.json
└── README.md
├── ruby
├── examples
│ ├── hello.rb
│ ├── parse
│ │ ├── Gemfile
│ │ ├── Gemfile.lock
│ │ └── parse.rb
│ ├── request_data.rb
│ └── events_to_slack.rb
├── Gemfile
├── Makefile
├── builder
│ ├── Makefile
│ ├── defaultBuildCmd
│ └── Dockerfile
├── Dockerfile
├── Gemfile.lock
├── fission
│ ├── context.rb
│ ├── handler.rb
│ └── request.rb
├── server.rb
└── envconfig.json
├── perl
├── Makefile
├── Dockerfile
├── envconfig.json
├── examples
│ └── hello.pm
├── server.pl
└── README.md
├── dotnet8
├── Fission.DotNet.Common
│ ├── obj
│ │ ├── Release
│ │ │ └── net8.0
│ │ │ │ ├── Fission.DotNet.Common.AssemblyInfoInputs.cache
│ │ │ │ ├── Fission.DotNet.Common.csproj.CoreCompileInputs.cache
│ │ │ │ ├── Fission.DotNet.Common.dll
│ │ │ │ ├── Fission.DotNet.Common.pdb
│ │ │ │ ├── ref
│ │ │ │ └── Fission.DotNet.Common.dll
│ │ │ │ ├── refint
│ │ │ │ └── Fission.DotNet.Common.dll
│ │ │ │ ├── Fission.DotNet.Common.assets.cache
│ │ │ │ ├── Fission.DotNet.Common.sourcelink.json
│ │ │ │ ├── .NETCoreApp,Version=v8.0.AssemblyAttributes.cs
│ │ │ │ ├── Fission.DotNet.Common.GlobalUsings.g.cs
│ │ │ │ ├── Fission.DotNet.Common.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ └── Fission.DotNet.Common.AssemblyInfo.cs
│ │ ├── Fission.DotNet.Common.csproj.nuget.g.targets
│ │ ├── project.nuget.cache
│ │ └── Fission.DotNet.Common.csproj.nuget.g.props
│ ├── bin
│ │ └── Release
│ │ │ └── net8.0
│ │ │ ├── Fission.DotNet.Common.dll
│ │ │ ├── Fission.DotNet.Common.pdb
│ │ │ └── Fission.DotNet.Common.deps.json
│ ├── ILogger.cs
│ ├── ICorsPolicy.cs
│ ├── FissionMqContext.cs
│ ├── Fission.DotNet.Common.csproj
│ ├── Fission.DotNet.Common.sln
│ └── FissionHttpContext.cs
├── Fission.DotNet
│ ├── Controllers
│ │ ├── BuildController.cs
│ │ └── HealthController.cs
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── Interfaces
│ │ ├── ISpecializeService.cs
│ │ ├── IFunctionStoreService.cs
│ │ └── IFunctionService.cs
│ ├── Model
│ │ ├── FissionSpecializeRequest.cs
│ │ └── FunctionStore.cs
│ ├── Services
│ │ ├── BuilderModeService.cs
│ │ ├── FunctionStoreService.cs
│ │ └── CustomAssemblyLoadContext.cs
│ ├── Fission.DotNet.csproj
│ ├── Adapter
│ │ └── FissionLoggerAdapter.cs
│ ├── Properties
│ │ └── launchSettings.json
│ └── Program.cs
├── examples
│ ├── HelloWorld
│ │ ├── MyFunction.cs
│ │ └── HelloWorld.csproj
│ ├── HttpTriggerExample
│ │ ├── HttpTriggerExample.csproj
│ │ └── MyFunction.cs
│ ├── AsyncFunctionExample
│ │ ├── AsyncFunctionExample.csproj
│ │ └── MyFunction.cs
│ └── MultiFileExample
│ │ ├── MyFunction.cs
│ │ ├── MultiFileExample.csproj
│ │ └── Models
│ │ ├── User.cs
│ │ ├── Weather.cs
│ │ └── DataModels.cs
├── builder
│ ├── Makefile
│ ├── Dockerfile
│ └── defaultBuildCmd
├── Makefile
├── envconfig.json
├── Dockerfile
└── .gitignore
├── hack
├── sort-json.sh
├── buildx.sh
└── merge-json.sh
├── go
├── examples
│ ├── module-example
│ │ ├── go.mod
│ │ ├── main.go
│ │ └── README.md
│ ├── hello.go
│ ├── specs
│ │ ├── env.yaml
│ │ ├── fission-deployment-config.yaml
│ │ └── function-hello.yaml
│ └── README.md
├── builder
│ ├── Dockerfile-1.1x
│ ├── Makefile
│ └── build.sh
├── Makefile
├── Dockerfile-1.1x
├── README.md
└── envconfig.json
├── README.md
├── .gitignore
├── .github
├── workflows
│ ├── filters
│ │ ├── filters.yaml
│ │ └── version_filter.yaml
│ └── README.md
└── actions
│ ├── collect-fission-dump
│ └── action.yml
│ └── setup-cluster
│ └── action.yml
├── rules.mk
├── .mergify.yml
└── kind.yaml
/python/tests/src/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dotnet20/.dockerignore:
--------------------------------------------------------------------------------
1 | builder
--------------------------------------------------------------------------------
/nodejs/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
--------------------------------------------------------------------------------
/python-fastapi/tests/src/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/examples/multifile/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/examples/sourcepkg/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/tests/src/sub_mod/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/jvm-jersey/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | bin/
3 |
--------------------------------------------------------------------------------
/python-fastapi/examples/multifile/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python-fastapi/examples/sourcepkg/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python-fastapi/tests/src/sub_mod/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/examples/sourcepkg/requirements.txt:
--------------------------------------------------------------------------------
1 | pyyaml
2 |
--------------------------------------------------------------------------------
/nodejs/test/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "commonjs"
3 | }
--------------------------------------------------------------------------------
/python/examples/multifile/message.txt:
--------------------------------------------------------------------------------
1 | Hello, world!
2 |
--------------------------------------------------------------------------------
/python-fastapi/examples/multifile/message.txt:
--------------------------------------------------------------------------------
1 | Hello, world!
2 |
--------------------------------------------------------------------------------
/python-fastapi/examples/sourcepkg/requirements.txt:
--------------------------------------------------------------------------------
1 | pyyaml
2 |
--------------------------------------------------------------------------------
/binary/examples/headers.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | env | grep "^HTTP_"
--------------------------------------------------------------------------------
/binary/examples/hello.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "Hello World!"
--------------------------------------------------------------------------------
/nodejs/examples/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./hello');
2 |
--------------------------------------------------------------------------------
/nodejs/test/test-case-5/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module"
3 | }
--------------------------------------------------------------------------------
/nodejs/test/test-case-6/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module"
3 | }
--------------------------------------------------------------------------------
/nodejs/test/test-case-7/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module"
3 | }
--------------------------------------------------------------------------------
/php7/examples/multifile/handlers/message.txt:
--------------------------------------------------------------------------------
1 | I said hellooooo!
2 |
--------------------------------------------------------------------------------
/binary/examples/echo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | printf "... "
4 | /bin/cat -
--------------------------------------------------------------------------------
/python-fastapi/requirements.txt:
--------------------------------------------------------------------------------
1 | fastapi==0.114.0
2 | uvicorn==0.30.6
3 |
--------------------------------------------------------------------------------
/python/examples/hello.py:
--------------------------------------------------------------------------------
1 | def main():
2 | return "Hello, world!\n"
3 |
--------------------------------------------------------------------------------
/python/tests/src/foo.py:
--------------------------------------------------------------------------------
1 | def bar():
2 | return 'THIS_IS_FOO_BAR'
3 |
--------------------------------------------------------------------------------
/jvm/examples/java/.gitignore:
--------------------------------------------------------------------------------
1 | .project
2 | .settings
3 | .classpath
4 | target/
5 |
--------------------------------------------------------------------------------
/dotnet/.gitignore:
--------------------------------------------------------------------------------
1 | bin/*
2 | obj/*
3 | out/*
4 | .vscode/*
5 | project.lock*
6 | TODO_dotnet
--------------------------------------------------------------------------------
/jvm-jersey/examples/java/.gitignore:
--------------------------------------------------------------------------------
1 | .project
2 | .settings
3 | .classpath
4 | target/
5 |
--------------------------------------------------------------------------------
/php7/examples/hello.php:
--------------------------------------------------------------------------------
1 | warning("Hello logger");
--------------------------------------------------------------------------------
/jvm/.gitignore:
--------------------------------------------------------------------------------
1 | .springBeans
2 | .project
3 | .mvn
4 | .settings
5 | .classpath
6 | target/
7 | bin/
8 |
--------------------------------------------------------------------------------
/python/tests/src/sub_mod/altmain.py:
--------------------------------------------------------------------------------
1 | def entrypoint():
2 | return 'THIS_IS_ALTMAIN_ENTRYPOINT'
3 |
--------------------------------------------------------------------------------
/tensorflow-serving/examples/half_plus_two/00000123/variables/variables.data-00000-of-00001:
--------------------------------------------------------------------------------
1 | ? @ @@
--------------------------------------------------------------------------------
/jvm/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: jvm-env-img
5 |
6 | jvm-env-img: Dockerfile
--------------------------------------------------------------------------------
/ruby/examples/hello.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | def handler
3 | "Hello, world!\n"
4 | end
5 |
--------------------------------------------------------------------------------
/perl/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: perl-env-img
5 |
6 | perl-env-img: Dockerfile
--------------------------------------------------------------------------------
/python-fastapi/examples/guestbook/requirements.txt:
--------------------------------------------------------------------------------
1 | redis==3.5.3
2 | MarkupSafe==2.1.4
3 | python-multipart==0.0.9
4 |
--------------------------------------------------------------------------------
/ruby/Gemfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | source "https://rubygems.org"
3 |
4 | gem "rack"
5 | gem "thin"
6 |
--------------------------------------------------------------------------------
/php7/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: php-builder php-env-img
5 |
6 | php-env-img: Dockerfile
--------------------------------------------------------------------------------
/python/examples/multifile/readfile.py:
--------------------------------------------------------------------------------
1 | def readFile(name):
2 | with open(name) as f:
3 | return f.read()
4 |
--------------------------------------------------------------------------------
/ruby/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: ruby-builder ruby-env-img
5 |
6 | ruby-env-img: Dockerfile
--------------------------------------------------------------------------------
/jvm/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: jvm-builder-img
5 |
6 | jvm-builder-img : Dockerfile
--------------------------------------------------------------------------------
/php7/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: php-builder-img
5 |
6 | php-builder-img: Dockerfile
--------------------------------------------------------------------------------
/python-fastapi/examples/multifile/readfile.py:
--------------------------------------------------------------------------------
1 | def readFile(name):
2 | with open(name) as f:
3 | return f.read()
4 |
--------------------------------------------------------------------------------
/python/tests/src/main.py:
--------------------------------------------------------------------------------
1 | def main():
2 | return 'THIS_IS_MAIN_MAIN'
3 |
4 | def func():
5 | return 'THIS_IS_MAIN_FUNC'
6 |
--------------------------------------------------------------------------------
/ruby/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: ruby-builder-img
5 |
6 | ruby-builder-img: Dockerfile
--------------------------------------------------------------------------------
/binary/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: binary-builder-img
5 |
6 | binary-builder-img: Dockerfile
--------------------------------------------------------------------------------
/dotnet/project-build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | dotnet restore fission-dotnet.csproj
3 | dotnet publish fission-dotnet.csproj -c Release -o out
4 |
--------------------------------------------------------------------------------
/jvm/builder/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -eou pipefail
3 | mvn clean package
4 | cp ${SRC_PKG}/target/*with-dependencies.jar ${DEPLOY_PKG}
--------------------------------------------------------------------------------
/dotnet20/project-build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | dotnet restore fission-dotnet20.csproj
3 | dotnet publish fission-dotnet20.csproj -c Release -o out
4 |
--------------------------------------------------------------------------------
/jvm-jersey/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: jvm-jersey-env-22-img
5 |
6 | jvm-jersey-env-22-img: Dockerfile
7 |
--------------------------------------------------------------------------------
/jvm-jersey/builder/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -eou pipefail
3 | mvn clean package
4 | cp ${SRC_PKG}/target/*with-dependencies.jar ${DEPLOY_PKG}
--------------------------------------------------------------------------------
/nodejs/examples/hello-callback.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = (context, callback) => {
3 | callback(200, "Hello, world callback!\n");
4 | }
5 |
--------------------------------------------------------------------------------
/python/examples/sourcepkg/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG} && cp -r ${SRC_PKG} ${DEPLOY_PKG}
--------------------------------------------------------------------------------
/dotnet/Makefile:
--------------------------------------------------------------------------------
1 | PLATFORMS ?= linux/amd64
2 |
3 | -include ../rules.mk
4 |
5 | .PHONY: all
6 | all: dotnet-env-img
7 |
8 | dotnet-env-img: Dockerfile
--------------------------------------------------------------------------------
/python-fastapi/examples/guestbook/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG} && cp -r ${SRC_PKG} ${DEPLOY_PKG}
3 |
--------------------------------------------------------------------------------
/python-fastapi/examples/sourcepkg/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG} && cp -r ${SRC_PKG} ${DEPLOY_PKG}
3 |
--------------------------------------------------------------------------------
/python-fastapi/tests/src/foo.py:
--------------------------------------------------------------------------------
1 | from fastapi import Request, Response
2 |
3 | def bar(request: Request):
4 | return Response('THIS_IS_FOO_BAR')
5 |
--------------------------------------------------------------------------------
/tensorflow-serving/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: tensorflow-serving-env-img
5 |
6 | tensorflow-serving-env-img: Dockerfile
--------------------------------------------------------------------------------
/jvm-jersey/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: jvm-jersey-builder-22-img
5 |
6 | jvm-jersey-builder-22-img: Dockerfile
7 |
--------------------------------------------------------------------------------
/python-fastapi/examples/statuscode.py:
--------------------------------------------------------------------------------
1 | from fastapi import Request, Response
2 |
3 | def main(request: Request):
4 | return Response("Not Found", 404)
5 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | 63b7bdec7d16ea8774fceb5335d6bcd9b1cb54c905159b91a92d392e27eb7b7b
2 |
--------------------------------------------------------------------------------
/nodejs/examples/echo.js:
--------------------------------------------------------------------------------
1 | module.exports = async function(ws, clients) {
2 |
3 | ws.on('message', message => {
4 | ws.send(message)
5 | });
6 | }
7 |
--------------------------------------------------------------------------------
/nodejs/examples/hello.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = async (context) => {
3 | return {
4 | status: 200,
5 | body: "hello, world!\n"
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/nodejs/test/test-case-1/helloWorld.js:
--------------------------------------------------------------------------------
1 | module.exports = async (context) => {
2 | return {
3 | status: 200,
4 | body: "hello, world!\n",
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/dotnet20/Makefile:
--------------------------------------------------------------------------------
1 | PLATFORMS ?= linux/amd64
2 |
3 | -include ../rules.mk
4 |
5 | .PHONY: all
6 | all: dotnet20-builder dotnet20-env-img
7 |
8 | dotnet20-env-img: Dockerfile
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 3e116a7e531ffaf5633e32e0bf4deb38175e8205076e04a01b1d750018d2f736
2 |
--------------------------------------------------------------------------------
/python-fastapi/examples/hello.py:
--------------------------------------------------------------------------------
1 | from fastapi import Request, Response
2 |
3 | def main(request: Request):
4 | return Response(content="Hello, World!", status_code=200)
--------------------------------------------------------------------------------
/dotnet20/builder/Makefile:
--------------------------------------------------------------------------------
1 | PLATFORMS ?= linux/amd64
2 |
3 | -include ../../rules.mk
4 |
5 | .PHONY: all
6 | all: dotnet20-builder-img
7 |
8 | dotnet20-builder-img: Dockerfile
--------------------------------------------------------------------------------
/hack/sort-json.sh:
--------------------------------------------------------------------------------
1 |
2 | #!/bin/bash
3 | JQ=jq
4 | for file in $(find . -name envconfig.json); do
5 | $JQ . -S <$file >$file.sorted
6 | mv $file.sorted $file
7 | done
8 |
--------------------------------------------------------------------------------
/python-fastapi/tests/src/sub_mod/altmain.py:
--------------------------------------------------------------------------------
1 | from fastapi import Request, Response
2 |
3 | def entrypoint(request: Request):
4 | return Response('THIS_IS_ALTMAIN_ENTRYPOINT')
5 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet/Controllers/BuildController.cs:
--------------------------------------------------------------------------------
1 | // This controller is not needed in the runtime environment
2 | // Build functionality is handled by the separate builder container
--------------------------------------------------------------------------------
/go/examples/module-example/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/fission/environments/go/examples/module-example
2 |
3 | go 1.22
4 |
5 | require golang.org/x/example v0.0.0-20210811190340-787a929d5a0d
6 |
--------------------------------------------------------------------------------
/tensorflow-serving/examples/half_plus_two/00000123/saved_model.pb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/tensorflow-serving/examples/half_plus_two/00000123/saved_model.pb
--------------------------------------------------------------------------------
/python/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: python-env-img
5 |
6 | python-env-img-buildargs := --build-arg PY_BASE_IMG=3.11-alpine
7 |
8 | python-env-img: Dockerfile
9 |
--------------------------------------------------------------------------------
/binary/builder/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG BUILDER_IMAGE=fission/builder:latest
2 | FROM ${BUILDER_IMAGE}
3 |
4 | FROM alpine:3.20
5 |
6 | COPY --from=0 /builder /builder
7 |
8 | ADD build.sh /usr/local/bin/build
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/perl/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM perl:latest
2 |
3 | RUN cpanm -n Twiggy Getopt::Args Dancer2
4 |
5 | COPY server.pl /server.pl
6 | WORKDIR /
7 |
8 | EXPOSE 8888
9 | ENTRYPOINT ["/server.pl"]
10 |
--------------------------------------------------------------------------------
/ruby/builder/defaultBuildCmd:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -euxo pipefail
3 |
4 | if [ -f ${SRC_PKG}/Gemfile.lock ]
5 | then
6 | cd $SRC_PKG
7 | bundle install --deployment
8 | fi
9 | cp -r ${SRC_PKG} ${DEPLOY_PKG}
--------------------------------------------------------------------------------
/dotnet20/envsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "LogDirectory": "logs",
3 | "RunningOnwindows": false,
4 | "DllDirectory": "Dlls",
5 | "functionBodyFileName": "func.cs",
6 | "functionSpecFileName": "func.meta.json"
7 | }
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/bin/Release/net8.0/Fission.DotNet.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/dotnet8/Fission.DotNet.Common/bin/Release/net8.0/Fission.DotNet.Common.dll
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/bin/Release/net8.0/Fission.DotNet.Common.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/dotnet8/Fission.DotNet.Common/bin/Release/net8.0/Fission.DotNet.Common.pdb
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.dll
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.pdb
--------------------------------------------------------------------------------
/ruby/examples/parse/Gemfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | source "https://rubygems.org"
4 |
5 | git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6 |
7 | gem "nokogiri", ">= 1.12.5"
--------------------------------------------------------------------------------
/tensorflow-serving/examples/half_plus_two/00000123/variables/variables.index:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/tensorflow-serving/examples/half_plus_two/00000123/variables/variables.index
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/ref/Fission.DotNet.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/ref/Fission.DotNet.Common.dll
--------------------------------------------------------------------------------
/python/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: python-builder-img
5 |
6 | python-builder-img-buildargs := --build-arg PY_BASE_IMG=3.11-alpine
7 |
8 | python-builder-img: Dockerfile
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Fission Environments
2 |
3 | A set of language environments for Fission.
4 |
5 | Please visit [Environments Reference](https://fission.io/environments/) to get information about different environments.
6 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/refint/Fission.DotNet.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/refint/Fission.DotNet.Common.dll
--------------------------------------------------------------------------------
/python/examples/statuscode.py:
--------------------------------------------------------------------------------
1 | def main():
2 | # You can return any http status code you like, simply place a comma after
3 | # your return statement, and typing in the status code.
4 | return "Not Found\n", 404
5 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Fission.DotNet.Common.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidchase/environments/master/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.assets.cache
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/python-fastapi/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: python-fastapi-env-img
5 |
6 | python-fastapi-env-img-buildargs := --build-arg PY_BASE_IMG=3.11-alpine
7 |
8 | python-fastapi-env-img: Dockerfile
9 |
--------------------------------------------------------------------------------
/python/builder/defaultBuildCmd:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -euxo pipefail
3 |
4 | if [ -f ${SRC_PKG}/requirements.txt ]
5 | then
6 | pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG}
7 | fi
8 | cp -r ${SRC_PKG} ${DEPLOY_PKG}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | environments-ui/node_modules
2 | #environments-ui/src/resources/environments.json
3 | environments-ui/public/bundle.js
4 | environments-ui/server.js
5 | .vscode
6 | node_modules
7 | **/node_modules/**
8 | *.DS_Store
9 |
--------------------------------------------------------------------------------
/dotnet/examples/helloworld.cs:
--------------------------------------------------------------------------------
1 | using Fission.DotNetCore.Api;
2 |
3 | public class FissionFunction
4 | {
5 | public string Execute(FissionContext context)
6 | {
7 | return "Hello World!";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/python/examples/sourcepkg/user.py:
--------------------------------------------------------------------------------
1 | import yaml
2 |
3 | document = """
4 | a: 1
5 | b:
6 | c: 3
7 | d: 4
8 | """
9 |
10 | def main():
11 | return yaml.dump(yaml.load(document), default_flow_style=None)
12 |
--------------------------------------------------------------------------------
/ruby/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ruby:2.6.1-alpine3.9
2 |
3 | RUN apk update
4 | RUN apk add --no-cache build-base
5 |
6 | COPY . /app
7 | WORKDIR /app
8 | RUN bundle install
9 |
10 | ENTRYPOINT ["ruby"]
11 | CMD ["server.rb"]
12 |
--------------------------------------------------------------------------------
/binary/Makefile:
--------------------------------------------------------------------------------
1 | -include ../rules.mk
2 |
3 | .PHONY: all
4 | all: binary-builder binary-env-img
5 |
6 | binary-env-img-buildargs := --build-arg GO_BASE_IMAGE=1.22-alpine --build-arg ALPINE_VERSION=3.20
7 |
8 | binary-env-img: Dockerfile
--------------------------------------------------------------------------------
/dotnet20/examples/helloworld.cs:
--------------------------------------------------------------------------------
1 | using Fission.DotNetCore.Api;
2 |
3 | public class FissionFunction
4 | {
5 | public string Execute(FissionContext context)
6 | {
7 | return "Hello World!";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/Fission.DotNet.Common.sourcelink.json:
--------------------------------------------------------------------------------
1 | {"documents":{"/Users/davidcasa/environments/*":"https://raw.githubusercontent.com/davidchase/environments/da8ab386daab96def321895f43b0f975caf774ca/*"}}
--------------------------------------------------------------------------------
/nodejs/builder/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cd ${SRC_PKG}
3 | if [[ -n "$NPM_TOKEN" ]] && [[ -n "$NPM_REGISTRY" ]]; then
4 | npm set //${NPM_REGISTRY}/:_authToken ${NPM_TOKEN}
5 | fi
6 | npm install && cp -r ${SRC_PKG} ${DEPLOY_PKG}
7 |
--------------------------------------------------------------------------------
/php7/builder/defaultBuildCmd:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -euxo pipefail
3 |
4 | if [ -f ${SRC_PKG}/composer.json ]
5 | then
6 | cd ${SRC_PKG}
7 | composer install --no-interaction
8 | fi
9 | cp -r ${SRC_PKG} ${DEPLOY_PKG}
10 |
--------------------------------------------------------------------------------
/python-fastapi/builder/defaultBuildCmd:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -euxo pipefail
3 |
4 | if [ -f ${SRC_PKG}/requirements.txt ]
5 | then
6 | pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG}
7 | fi
8 | cp -r ${SRC_PKG} ${DEPLOY_PKG}
--------------------------------------------------------------------------------
/python-fastapi/tests/src/main.py:
--------------------------------------------------------------------------------
1 | from fastapi import Request, Response
2 |
3 | def main(request: Request):
4 | return Response('THIS_IS_MAIN_MAIN')
5 |
6 | def func(request: Request):
7 | return Response('THIS_IS_MAIN_FUNC')
8 |
--------------------------------------------------------------------------------
/binary/builder/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | apk update
4 |
5 | CWD=$(pwd)
6 |
7 | if [ -f ${SRC_PKG}/build.sh ]; then
8 | cd ${SRC_PKG}
9 | ./build.sh
10 | cd ${CWD}
11 | fi
12 |
13 | cp -rf ${SRC_PKG} ${DEPLOY_PKG}
14 |
--------------------------------------------------------------------------------
/dotnet8/examples/HelloWorld/MyFunction.cs:
--------------------------------------------------------------------------------
1 | using Fission.DotNet.Common;
2 |
3 | public class MyFunction
4 | {
5 | public object Execute(FissionContext context)
6 | {
7 | return "Hello World!x";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/python-fastapi/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: python-fastapi-builder-img
5 |
6 | python-fastapi-builder-img-buildargs := --build-arg PY_BASE_IMG=3.11-alpine
7 |
8 | python-fastapi-builder-img: Dockerfile
9 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet/Interfaces/ISpecializeService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Fission.DotNet.Model;
3 |
4 | namespace Fission.DotNet.Interfaces;
5 |
6 | public interface ISpecializeService
7 | {
8 | void Specialize(FissionSpecializeRequest request);
9 | }
10 |
--------------------------------------------------------------------------------
/go/examples/hello.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "net/http"
5 | )
6 |
7 | // Handler is the entry point for this fission function
8 | func Handler(w http.ResponseWriter, r *http.Request) {
9 | msg := "Hello, world!\n"
10 | w.Write([]byte(msg))
11 | }
12 |
--------------------------------------------------------------------------------
/binary/examples/hello.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | )
7 |
8 | // See README.md in the examples/binary directory for instructions
9 | func main() {
10 | fmt.Println("Hello World!")
11 | fmt.Printf("Environment: %v", os.Environ())
12 | }
13 |
--------------------------------------------------------------------------------
/python/examples/requestdata.py:
--------------------------------------------------------------------------------
1 | from flask import request
2 | from flask import current_app
3 |
4 | def main():
5 | current_app.logger.info("Received request")
6 | msg = "---HEADERS---\n%s\n--BODY--\n%s\n-----\n" % (request.headers, request.get_data())
7 | return msg
8 |
--------------------------------------------------------------------------------
/binary/examples/module-example/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | num1=0
4 | num2=1
5 |
6 | i=0
7 | while [ "$i" -le 10 ]
8 | do
9 | echo "$num1 "
10 | sum=$((num1+num2))
11 | num1=$num2
12 | num2=$sum
13 | i=$(( i + 1 ))
14 | done
15 | echo "Modules are awesome!"
--------------------------------------------------------------------------------
/nodejs/examples/broadcast.js:
--------------------------------------------------------------------------------
1 | module.exports = async function(ws, clients) {
2 |
3 | ws.on('message', function incoming(data) {
4 | clients.forEach(function each(client) {
5 | client.send(data);
6 | });
7 | });
8 | });
9 | }
10 |
--------------------------------------------------------------------------------
/python/examples/websocket/main.py:
--------------------------------------------------------------------------------
1 | def main(ws, clients):
2 | print("The number of clients is: {}".format(len(clients)))
3 | count = 0
4 | while not ws.closed and count < 5:
5 | message = ws.receive()
6 | ws.send(message)
7 | count += 1
8 | ws.close()
--------------------------------------------------------------------------------
/php7/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "autoload": {
3 | "psr-4": {
4 | "PHPEnv\\": "src/"
5 | }
6 | },
7 | "require": {
8 | "monolog/monolog": "^1.22",
9 | "react/http": "^0.8.4",
10 | "nikic/php-parser": "^4.2"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
5 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet.Common/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "j1Y/WP+AzWA=",
4 | "success": true,
5 | "projectFilePath": "/Users/davidcasa/environments/dotnet8/Fission.DotNet.Common/Fission.DotNet.Common.csproj",
6 | "expectedPackageFiles": [],
7 | "logs": []
8 | }
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet/Interfaces/IFunctionStoreService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Fission.DotNet.Model;
3 |
4 | namespace Fission.DotNet.Interfaces;
5 |
6 | public interface IFunctionStoreService
7 | {
8 | void SetFunction(FunctionStore function);
9 | FunctionStore GetFunction();
10 | }
11 |
--------------------------------------------------------------------------------
/go/builder/Dockerfile-1.1x:
--------------------------------------------------------------------------------
1 | ARG BUILDER_IMAGE=fission/builder
2 | ARG GO_VERSION
3 |
4 | FROM ${BUILDER_IMAGE}
5 |
6 | FROM golang:${GO_VERSION}
7 |
8 | ENV GOPATH /usr
9 | ENV GO111MODULE on
10 | WORKDIR ${GOPATH}
11 |
12 | COPY --from=0 /builder /builder
13 | ADD build.sh /usr/local/bin/build
14 |
--------------------------------------------------------------------------------
/go/examples/specs/env.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fission.io/v1
2 | kind: Environment
3 | metadata:
4 | name: go
5 | namespace: default
6 | spec:
7 | version: 2
8 | builder:
9 | command: build
10 | image: fission/go-builder-1.12:1.5.0
11 | runtime:
12 | image: fission/go-env-1.12:1.5.0
13 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet/Model/FissionSpecializeRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Fission.DotNet.Model;
4 |
5 | public class FissionSpecializeRequest
6 | {
7 | public string filepath { get; set; }
8 | public string functionName { get; set; }
9 | public string url { get; set; }
10 | }
11 |
--------------------------------------------------------------------------------
/nodejs/test/test.js:
--------------------------------------------------------------------------------
1 | module.exports = async function (context) {
2 | console.log("headers=", JSON.stringify(context.request.headers));
3 | console.log("body=", JSON.stringify(context.request.body));
4 |
5 | return {
6 | status: 200,
7 | body: "Hello, world !\n"
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/python/examples/multifile/main.py:
--------------------------------------------------------------------------------
1 | from flask import current_app
2 | import sys
3 | import readfile
4 | import os
5 |
6 | def main():
7 | current_app.logger.info("Hi")
8 |
9 | current_dir = os.path.dirname(__file__)
10 |
11 | return readfile.readFile(os.path.join(current_dir, "message.txt"))
12 |
--------------------------------------------------------------------------------
/dotnet20/builder/Model/ExcludeDll.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Builder.Model
6 | {
7 | public class ExcludeDll
8 | {
9 | public string dllName { get; set; }
10 | public string packageName { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/dotnet20/builder/Model/IncludeNuget.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Builder.Model
6 | {
7 | public class IncludeNuget
8 | {
9 | public string packageName { get; set; }
10 | public string version { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/python-fastapi/examples/requestdata.py:
--------------------------------------------------------------------------------
1 | from fastapi import logger, Request, Response
2 |
3 | async def main(request: Request):
4 | logger.logger.info("Received request")
5 | msg = "---HEADERS---\n%s\n--BODY--\n%s\n-----\n" % (request.headers, str(await request.body(), encoding='utf-8'))
6 | return Response(msg)
7 |
--------------------------------------------------------------------------------
/dotnet20/examples/echo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Fission.DotNetCore.Api;
3 |
4 | public class FissionFunction
5 | {
6 | public string Execute(FissionContext context){
7 | context.Logger.WriteInfo("executing.. {0}", context.Arguments["text"]);
8 | return (string)context.Arguments["text"];
9 | }
10 | }
--------------------------------------------------------------------------------
/jvm/examples/java/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This script allows you to build the jar without needing Maven & JDK installed locally.
3 | # You need docker, as it uses a Docker image to build source code
4 | set -eou pipefail
5 | docker run -it --rm -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.5-jdk-8 mvn clean package
6 |
--------------------------------------------------------------------------------
/nodejs/test/test-case-5/helloWorld.js:
--------------------------------------------------------------------------------
1 | // ESM helloWorld test case for Node.js 22
2 | export default async (context) => {
3 | return {
4 | status: 200,
5 | body: "hello, world from ESM! 🎉\n",
6 | headers: {
7 | "X-Module-Type": "ESM",
8 | "X-Node-Version": process.version
9 | }
10 | };
11 | };
--------------------------------------------------------------------------------
/ruby/builder/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG BUILDER_IMAGE=fission/builder:latest
2 | FROM ${BUILDER_IMAGE}
3 |
4 | FROM ruby:2.6.1-alpine3.9
5 | COPY --from=0 /builder /builder
6 |
7 | RUN apk update
8 | RUN apk add --no-cache ruby ruby-dev ruby-bundler build-base
9 |
10 | ADD defaultBuildCmd /usr/local/bin/build
11 |
12 | EXPOSE 8001
13 |
--------------------------------------------------------------------------------
/jvm-jersey/examples/java/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This script allows you to build the jar without needing Maven & JDK installed locally.
3 | # You need docker, as it uses a Docker image to build source code
4 | set -eou pipefail
5 | docker run -it --rm -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.5-jdk-8 mvn clean package
6 |
--------------------------------------------------------------------------------
/nodejs/builder/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG NODE_BASE_IMG
2 | ARG BUILDER_IMAGE=fission/builder:latest
3 |
4 | FROM ${BUILDER_IMAGE}
5 |
6 | FROM node:${NODE_BASE_IMG}
7 |
8 | ARG NODE_ENV
9 | ENV NODE_ENV $NODE_ENV
10 |
11 | COPY --from=0 /builder /builder
12 | ADD build.sh /usr/local/bin/build
13 | RUN chmod +x /usr/local/bin/build
14 |
--------------------------------------------------------------------------------
/nodejs/examples/multi-entry.js:
--------------------------------------------------------------------------------
1 | module.exports.entry1 = async (context) => {
2 | return {
3 | status: 200,
4 | body: "Hello, entry 1!\n"
5 | };
6 | }
7 |
8 | module.exports.entry2 = async (context) => {
9 | return {
10 | status: 200,
11 | body: "Hello, entry 2!\n"
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/go/builder/Makefile:
--------------------------------------------------------------------------------
1 | -include ../../rules.mk
2 |
3 | .PHONY: all
4 | all: go-builder-img go-builder-1.23-img
5 |
6 | go-builder-img-buildargs := --build-arg GO_VERSION=1.22
7 |
8 | go-builder-1.23-img-buildargs := --build-arg GO_VERSION=1.23
9 |
10 | go-builder-img: Dockerfile-1.1x
11 |
12 | go-builder-1.23-img: Dockerfile-1.1x
13 |
--------------------------------------------------------------------------------
/dotnet8/Fission.DotNet/Interfaces/IFunctionService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Fission.DotNet.Common;
3 |
4 | namespace Fission.DotNet.Interfaces;
5 |
6 | public interface IFunctionService
7 | {
8 | void Load();
9 | void Unload();
10 | Task