serverless

package
v1.18.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadEnvFile added in v1.18.7

func LoadEnvFile(envDir string) error

LoadEnvFile loads the environment variables from the file

func Register

func Register(s Serverless, exts ...string)

Register will register a serverless to drivers collections safely

Types

type Options

type Options struct {
	// Filename is the path to the serverless file.
	Filename string
	// ZipperAddrs is the address of the zipper server
	ZipperAddr string
	// Name is the name of the service.
	Name string
	// ModFile is the path to the module file.
	ModFile string
	// Client credential
	Credential string
	// Runtime specifies the serverless runtime environment type
	Runtime string
	// WASI build with WASI target
	WASI bool
}

Options describles the command arguments of serverless.

type Serverless

type Serverless interface {
	// Init initializes the serverless
	Init(opts *Options) error

	// Build compiles the serverless to executable
	Build(clean bool) error

	// Run compiles and runs the serverless
	Run(verbose bool) error

	// Executable returns true if the serverless is executable
	Executable() bool
}

Serverless defines the interface for serverless

func Create

func Create(opts *Options) (Serverless, error)

Create returns a new serverless instance with options.

Directories

Path Synopsis
Package deno provides a js/ts serverless runtime
Package deno provides a js/ts serverless runtime
Package wasm provides WebAssembly serverless function runtimes.
Package wasm provides WebAssembly serverless function runtimes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL