Documentation
¶
Index ¶
- func Log(stream io.WriteCloser, msg string)
- type Config
- func (c *Config) AccessCred(ctx context.Context) (*cred.Aws, error)
- func (c *Config) AddEnv(ctx context.Context, env *[]string) error
- func (c *Config) BaseHandlerLocation() string
- func (c *Config) BaseLogLocation() string
- func (c *Config) Cred(ctx context.Context) (*cred.Aws, error)
- func (c *Config) Init()
- func (c *Config) Lookup(fnName string) *FunctionConfig
- type ConfigOption
- type Context
- type Debug
- type Delve
- type Function
- type FunctionConfig
- type FunctionConfigOption
- type Router
- type Service
- type URI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Log ¶
func Log(stream io.WriteCloser, msg string)
Types ¶
type Config ¶
type Config struct {
Debug *Debug
AccountID int
FuncLocation string
LogLocation string
Secret *scy.Resource
AccessSecret *scy.Resource
Functions []*FunctionConfig
Port int
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(port int, fnLocation, logLocation string, opts ...ConfigOption) *Config
NewConfig creates a config
func (*Config) BaseHandlerLocation ¶
func (*Config) BaseLogLocation ¶
func (*Config) Lookup ¶
func (c *Config) Lookup(fnName string) *FunctionConfig
type ConfigOption ¶
type ConfigOption func(c *Config)
func WithFunction ¶
func WithFunction(config *FunctionConfig) ConfigOption
type Context ¶
type Context struct {
RequestID string
FnName string
Version string
MemSize string
Timeout string
Region string
AccountID string
XAmznTraceID string
InvokedFunctionArn string
ClientContext string
CognitoIdentity string
Start time.Time
InvokeWait time.Time
InitEnd time.Time
TimeoutDuration time.Duration
InvokePayload []byte
InvokeResponse []byte
InvokeError string
MaxMem uint64
LogType string
}
func (*Context) HasExpired ¶
func (*Context) ParseTimeout ¶
func (c *Context) ParseTimeout()
type Function ¶
type Function struct {
Config *FunctionConfig
Cmd *exec.Cmd
Port int
LogStream io.WriteCloser
// contains filtered or unexported fields
}
func NewFunction ¶
func NewFunction(config *FunctionConfig) (*Function, error)
NewFunction creates a function
func (*Function) Call ¶
func (f *Function) Call(ctx context.Context, request *messages.InvokeRequest) (*messages.InvokeResponse, error)
type FunctionConfig ¶
type FunctionConfig struct {
lambda.FunctionConfiguration
*Config
CodeURI string
}
func NewFunctionConfig ¶
func NewFunctionConfig(name, handler string, opts ...FunctionConfigOption) *FunctionConfig
func (*FunctionConfig) Init ¶
func (c *FunctionConfig) Init(cfg *Config)
func (*FunctionConfig) MergeFrom ¶
func (c *FunctionConfig) MergeFrom(config *lambda.FunctionConfiguration)
type FunctionConfigOption ¶
type FunctionConfigOption func(c *FunctionConfig)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.