golambda

package
v0.0.0-...-2114318 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorLambdaResponse

func NewErrorLambdaResponse(eventId string, err error, stderr string) *liblambda.Response

func NewLambdaClient

func NewLambdaClient(target string) (lambda.LambdaClient, error)

func NewSimpleLambdaEvent

func NewSimpleLambdaEvent(event string) *liblambda.Event

func NewSimpleLambdaResponse

func NewSimpleLambdaResponse(eventId, stdout, stderr, responseString string, err error) (response *liblambda.Response)

Types

type BasicCodeExecutor

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

type ContainerExecutor

type ContainerExecutor struct {
	Env         map[string]string
	State       string
	ContainerId string
	// contains filtered or unexported fields
}

func NewContainerExecutor

func NewContainerExecutor(function *Function) ContainerExecutor

func (*ContainerExecutor) StartContainer

func (executor *ContainerExecutor) StartContainer(tempDir string) error

func (*ContainerExecutor) StopContainer

func (executor *ContainerExecutor) StopContainer()

type DockerContainerManager

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

func (*DockerContainerManager) Init

func (manager *DockerContainerManager) Init() error

type Function

type Function struct {
	Name           string `json:"name"`
	Description    string `json:"description"`
	Executor       LambdaExecutor
	CodeUri        string `json:"codeuri"`
	Handler        string `json:"handler"`
	Timeout        time.Duration
	TimeoutSeconds string            `json:"timeout-seconds"`
	Runtime        string            `json:"runtime"`
	Arn            string            `json:"arn"`
	Tags           map[string]string `json:"tags"`
	Env            map[string]string `json:"env"`
}

func NewContainerLambdaFunction

func NewContainerLambdaFunction(name, codeUri, runtime, handler string) *Function

func NewLocalOsLambdaFunction

func NewLocalOsLambdaFunction(name, codeUri, argument string) Function

func (*Function) CalculateArn

func (function *Function) CalculateArn(awsAccountNumber int64) string

func (*Function) Invoke

func (function *Function) Invoke(event *liblambda.Event) (response *liblambda.Response, err error)

type LambdaExecutor

type LambdaExecutor interface {
	// contains filtered or unexported methods
}

type LocalOsExecutor

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

func NewLocalOsExecutor

func NewLocalOsExecutor(function Function) *LocalOsExecutor

Jump to

Keyboard shortcuts

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