Documentation ¶
Index ¶
- type LambdaFunction
- type LambdaRegistry
- type LambdaService
- func (s *LambdaService) Close() error
- func (s *LambdaService) Create(ctx context.Context, input *lambda.CreateFunctionInput) (*LambdaFunction, error)
- func (s *LambdaService) InvokeAsync(ctx context.Context, input *lambda.InvokeAsyncInput) (*lambda.InvokeAsyncOutput, error)
- func (s *LambdaService) InvokeSync(ctx context.Context, input *lambda.InvokeInput) (*lambda.InvokeOutput, error)
- type SourceMappingService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LambdaFunction ¶
type LambdaFunction struct { CodeSha256 string FunctionName string CodeSize int64 RevisionID string `json:"RevisionId"` // use uuid MemorySize int64 FunctionArn string Version string // "$LATEST", Timeout int64 LastModified time.Time Handler string Runtime string Description *string // contains filtered or unexported fields }
LambdaFunction describes lambda function settings. via https://docs.aws.amazon.com/cli/latest/reference/lambda/create-function.html
type LambdaRegistry ¶
type LambdaRegistry struct {
// contains filtered or unexported fields
}
LambdaRegistry holds lambda function settings in memory.
func NewLambdaRegistry ¶
func NewLambdaRegistry() *LambdaRegistry
NewLambdaRegistry returns LambdaRegistry object.
func (*LambdaRegistry) Get ¶
func (r *LambdaRegistry) Get(name string) *LambdaFunction
Get returns LambdaFucntion object from given name.
func (*LambdaRegistry) GetFromARN ¶
func (r *LambdaRegistry) GetFromARN(arn string) *LambdaFunction
GetFromARN returns LambdaFunction object from given function arn.
func (*LambdaRegistry) Register ¶
func (r *LambdaRegistry) Register(lf *LambdaFunction)
Register sets LambdaFunction into registry.
type LambdaService ¶
type LambdaService struct {
// contains filtered or unexported fields
}
LambdaService provides interfaces for operationg lambda functions.
func NewLambdaService ¶
func NewLambdaService(docker docker.Docker, dir string, r *LambdaRegistry) *LambdaService
NewLambdaService returns LambdaService object.
func (*LambdaService) Close ¶
func (s *LambdaService) Close() error
Close closes all lambda function containers.
func (*LambdaService) Create ¶
func (s *LambdaService) Create(ctx context.Context, input *lambda.CreateFunctionInput) (*LambdaFunction, error)
Create creates new lambda function.
func (*LambdaService) InvokeAsync ¶
func (s *LambdaService) InvokeAsync(ctx context.Context, input *lambda.InvokeAsyncInput) (*lambda.InvokeAsyncOutput, error)
InvokeAsync invokes lambda function without waiting response.
func (*LambdaService) InvokeSync ¶
func (s *LambdaService) InvokeSync(ctx context.Context, input *lambda.InvokeInput) (*lambda.InvokeOutput, error)
InvokeSync invokes lambda function with waiting response.
type SourceMappingService ¶
type SourceMappingService struct {
// contains filtered or unexported fields
}
SourceMappingService provides interfaces for operating EventSourceMapping for lambda.
func (*SourceMappingService) CreateEventSourceMapping ¶
func (s *SourceMappingService) CreateEventSourceMapping(ctx context.Context, input *lambda.CreateEventSourceMappingInput) error
CreateEventSourceMapping creates mappings for lambda invokation from sqs or kinesis streams.