runtime

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

README

runtime

-- import "."

Usage

func CommonPostInit
func CommonPostInit()

Post-initialization common to all runtime types here

func CommonPreInit
func CommonPreInit()

Pre-initialization common to all runtime types here

func RunFlex
func RunFlex(instance Instance) error

Common run (once) function

type Default
type Default struct {
}
func (*Default) SetConfigDir
func (i *Default) SetConfigDir(s string)
type Function
type Function struct {
}

GCP Function runtime

func (*Function) SetConfigDir
func (i *Function) SetConfigDir(s string)
type Instance
type Instance interface {
	SetConfigDir(string)
	// contains filtered or unexported methods
}

Serverless runtimes must implement this

func GetDefaultRuntime
func GetDefaultRuntime() Instance

Get a server-based, default, runtime

func GetFlexRuntime
func GetFlexRuntime() Instance

Get the first available runtime type, defaults to the server-based (Linux | Windows) Default type

func GetTestRuntime
func GetTestRuntime() Instance

Get the test runtime

type Lambda
type Lambda struct {
}

AWS Lambda runtime

func (*Lambda) FlexAsALambdaHandler
func (i *Lambda) FlexAsALambdaHandler(ctx context.Context, event interface{}) (string, error)

FlexAsALambdaHandler receives the incoming lambda request, from the AWS perspective this is the entry point

func (*Lambda) SetConfigDir
func (i *Lambda) SetConfigDir(s string)
type Test
type Test struct {
}
func (*Test) SetConfigDir
func (i *Test) SetConfigDir(s string)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPostInit

func CommonPostInit()

Post-initialization common to all runtime types here

func CommonPreInit

func CommonPreInit()

CommonPreInit Pre-initialization common to all runtime types here

func RunFlex

func RunFlex(instance Instance) error

RunFlex Common run (once) function

Types

type Default

type Default struct {
}

func (*Default) SetConfigDir

func (i *Default) SetConfigDir(s string)

type Function

type Function struct {
	// contains filtered or unexported fields
}

GCP Function runtime

func (*Function) SetConfigDir

func (i *Function) SetConfigDir(s string)

type Instance

type Instance interface {
	SetConfigDir(string)
	// contains filtered or unexported methods
}

Serverless runtimes must implement this

func GetDefaultRuntime

func GetDefaultRuntime() Instance

Get a server-based, default, runtime

func GetFlexRuntime

func GetFlexRuntime() Instance

Get the first available runtime type, defaults to the server-based (Linux | Windows) Default type

func GetTestRuntime

func GetTestRuntime() Instance

Get the test runtime

type Lambda

type Lambda struct {
	// contains filtered or unexported fields
}

AWS Lambda runtime

func (*Lambda) FlexAsALambdaHandler

func (i *Lambda) FlexAsALambdaHandler(ctx context.Context, event interface{}) (string, error)

FlexAsALambdaHandler receives the incoming lambda request, from the AWS perspective this is the entry point

func (*Lambda) SetConfigDir

func (i *Lambda) SetConfigDir(s string)

type Test

type Test struct {
}

func (*Test) SetConfigDir

func (i *Test) SetConfigDir(s string)

Jump to

Keyboard shortcuts

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