client

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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