client

package
v3.61.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 13 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

func (*Type) InvokeV2 added in v3.39.0

func (l *Type) InvokeV2(p types.Part) error

InvokeV2 attempts to invoke a lambda function with a message and replaces its contents with the result on success, or returns an error.

Jump to

Keyboard shortcuts

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