corlambda

package
v0.0.0-...-3b296bd Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MaxLambdaRetries = 3

MaxLambdaRetries is the number of times to try invoking a function before giving up and returning an error

Variables

This section is empty.

Functions

This section is empty.

Types

type FunctionConfig

type FunctionConfig struct {
	Name       string
	RoleARN    string
	Timeout    int64
	MemorySize int64
}

FunctionConfig holds the configuration of an individual Lambda function

type LambdaClient

type LambdaClient struct {
	Client lambdaiface.LambdaAPI
}

LambdaClient wraps the AWS Lambda API and provides functions for deploying and invoking lambda functions

func NewLambdaClient

func NewLambdaClient() *LambdaClient

NewLambdaClient initializes a new LambdaClient

func (*LambdaClient) DeleteFunction

func (l *LambdaClient) DeleteFunction(functionName string) error

DeleteFunction tears down the given function

func (*LambdaClient) DeployFunction

func (l *LambdaClient) DeployFunction(function *FunctionConfig) error

DeployFunction deploys the current directory as a lamba function

func (*LambdaClient) Invoke

func (l *LambdaClient) Invoke(functionName string, payload []byte) (outputPayload []byte, err error)

Invoke invokes the given Lambda function with the given payload.

Jump to

Keyboard shortcuts

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