serverless

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.yml file.
	Filename string
	// Host is the hostname to listen on or connect to.
	Host string
	// Port is the port to listen on or connect to.
	Port int
	// Name is the name of the service.
	Name string
	// ModFile is the path to the module file.
	ModFile string
	// Arguments are the command line arguments.
	Arguments []string
	// Client credential
	Credential string
}

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() 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

Jump to

Keyboard shortcuts

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