container

package
v0.0.0-...-6f0d270 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExceedConcurrencyLimit

type ExceedConcurrencyLimit struct {
}

ExceedConcurrencyLimit means the number of waitting task beyonds the concurrencyLimit

func (*ExceedConcurrencyLimit) Error

func (e *ExceedConcurrencyLimit) Error() string

type Meta

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

Meta is an abstract handler of a specified env container

func NewMeta

func NewMeta(containerHost string, funcName string, runtime string) (*Meta, error)

NewMeta returns a container handler which maintains a rpc connection with the container

func (*Meta) GetFuncName

func (m *Meta) GetFuncName() string

GetFuncName

func (*Meta) GetRuntime

func (m *Meta) GetRuntime() string

func (*Meta) InvokeFunc

func (m *Meta) InvokeFunc(ctx context.Context, funcName string, payload []byte) ([]byte, error)

InvokeFunc exec the func in container

func (*Meta) LoadFunc

func (m *Meta) LoadFunc(ctx context.Context, funcName string, url string) error

LoadFunc reset the function settings in container

func (*Meta) SetConcurrencyLimit

func (m *Meta) SetConcurrencyLimit(limit int64)

SetConcurrencyLimit this limit influence the invoke, pls refer to invoke

func (*Meta) SetEnvVariable

func (m *Meta) SetEnvVariable(ctx context.Context, envs []string) error

SetEnvVariable overwrite some envs in container

func (*Meta) SetTimeout

func (m *Meta) SetTimeout(timeout int64)

SetTimeout timeout is used to limit the invokecation exec time

Jump to

Keyboard shortcuts

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