client

package
v3.16.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldSpecs added in v3.10.0

func FieldSpecs() docs.FieldSpecs

FieldSpecs returns field specs for a lambda client config.

func OptSetLogger

func OptSetLogger(log log.Modular) func(*Type)

OptSetLogger sets the logger to use.

func OptSetManager

func OptSetManager(mgr types.Manager) func(*Type)

OptSetManager sets the manager to use.

func OptSetStats

func OptSetStats(stats metrics.Type) func(*Type)

OptSetStats sets the metrics aggregator to use.

Types

type Config

type Config struct {
	session.Config `json:",inline" yaml:",inline"`
	Function       string `json:"function" yaml:"function"`
	Timeout        string `json:"timeout" yaml:"timeout"`
	NumRetries     int    `json:"retries" yaml:"retries"`
	RateLimit      string `json:"rate_limit" yaml:"rate_limit"`
}

Config contains configuration fields for the Lambda client.

func NewConfig

func NewConfig() Config

NewConfig returns a Config with default values.

type Type

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

Type is a client that performs lambda invocations.

func New

func New(conf Config, opts ...func(*Type)) (*Type, error)

New returns a Lambda client.

func (*Type) Invoke

func (l *Type) Invoke(msg types.Message) (types.Message, error)

Invoke attempts to invoke lambda function with a message as its payload.

Jump to

Keyboard shortcuts

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