corwhisk

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPullRetries = 4
View Source
const MaxRetries = 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 WhiskCacheConfigInjector added in v0.1.2

type WhiskCacheConfigInjector interface {
	corcache.CacheConfigIncector
	ConfigureWhisk(action *whisk.Action) error
}

type WhiskClient

type WhiskClient struct {
	Client *whisk.Client
	// contains filtered or unexported fields
}

func NewWhiskClient

func NewWhiskClient(conf WhiskClientConfig) *WhiskClient

NewLambdaClient initializes a new LambdaClient

func (*WhiskClient) DeleteFunction

func (l *WhiskClient) DeleteFunction(name string) error

func (*WhiskClient) DeployFunction

func (l *WhiskClient) DeployFunction(conf WhiskFunctionConfig) error

func (*WhiskClient) Invoke

func (l *WhiskClient) Invoke(name string, payload interface{}) (io.ReadCloser, error)

type WhiskClientApi added in v0.1.0

type WhiskClientApi interface {
	Invoke(name string, payload interface{}) (io.ReadCloser, error)
	DeployFunction(conf WhiskFunctionConfig) error
	DeleteFunction(name string) error
}

type WhiskClientConfig added in v0.1.2

type WhiskClientConfig struct {
	RequestPerMinute int64
	RequestBurstRate int

	Host  string
	Token string

	Context           context.Context
	RemoteLoggingHost string

	BatchRequestFeature    bool
	MultiDeploymentFeatrue bool
}

type WhiskFunctionConfig

type WhiskFunctionConfig struct {
	Memory              int
	Timeout             int
	FunctionName        string
	CacheConfigInjector corcache.CacheConfigIncector
}

type WhiskPayload added in v0.1.0

type WhiskPayload struct {
	Value interface{}        `json:"value"`
	Env   map[string]*string `json:"env"`
}

Jump to

Keyboard shortcuts

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