Versions in this module Expand all Collapse all v0 v0.1.1 Jun 20, 2018 Changes in this version + const HookPostInvoke + const HookPostReport + const HookPostSetup + const HookPreInvoke + const HookPreReport + const HookPreSetup + const RUNTIME + const VERSION + func False() *bool + func NewContext(parent context.Context, cw *ContextWrapper) context.Context + func True() *bool + type Agent struct + func NewAgent(config Config) *Agent + func (a *Agent) WrapHandler(handler interface{}) interface{} + type Config struct + Debug *bool + Enabled *bool + PluginInstantiators []PluginInstantiator + Reporter Reporter + TimeoutWindow *time.Duration + Token *string + type ContextWrapper struct + IOpipe *HandlerWrapper + func FromContext(ctx context.Context) (*ContextWrapper, bool) + func NewContextWrapper(ctx *lambdacontext.LambdaContext, handler *HandlerWrapper) *ContextWrapper + type CustomMetric struct + N interface{} + Name string + S interface{} + type HandlerWrapper struct + func NewHandlerWrapper(handler interface{}, agent *Agent) *HandlerWrapper + func (hw *HandlerWrapper) Error(err error) + func (hw *HandlerWrapper) Invoke(ctx context.Context, payload interface{}) (response interface{}, err error) + func (hw *HandlerWrapper) Label(name string) + func (hw *HandlerWrapper) Metric(name string, value interface{}) + type InvocationError struct + Message string + Name string + Stack string + StackTrace []*panicErrorStackFrame + func NewInvocationError(err error) *InvocationError + func NewPanicInvocationError(err interface{}) *InvocationError + func (h *InvocationError) Error() string + type LoggerPluginConfig struct + Key string + type Plugin interface + Enabled func() bool + Homepage func() string + Meta func() *PluginMeta + Name func() string + PostInvoke func(context.Context, interface{}) + PostReport func(*Report) + PostSetup func(*Agent) + PreInvoke func(context.Context, interface{}) + PreReport func(*Report) + PreSetup func(*Agent) + Version func() string + type PluginInstantiator func() Plugin + func LoggerPlugin(config LoggerPluginConfig) PluginInstantiator + func TestPlugin(config TestPluginConfig) PluginInstantiator + type PluginMeta struct + Enabled bool + Homepage string + Name string + Version string + type Report struct + AWS *ReportAWS + ClientID string + ColdStart bool + CustomMetrics []CustomMetric + Disk *ReportDisk + Duration int + Environment *ReportEnvironment + Errors interface{} + InstallMethod string + Labels []string + Plugins []interface{} + ProcessID string + Timestamp int + TimestampEnd int + func NewReport(handler *HandlerWrapper) *Report + type ReportAWS struct + AWSRequestID string + FunctionName string + FunctionVersion string + GetRemainingTimeInMillis int + InvokedFunctionArn string + LogGroupName string + LogStreamName string + MemoryLimitInMB int + TraceID string + type ReportDisk struct + TotalMiB float64 + UsedMiB float64 + UsedPercentage float64 + type ReportEnvironment struct + Agent *ReportEnvironmentAgent + Host *ReportEnvironmentHost + OS *ReportEnvironmentOS + Runtime *ReportEnvironmentRuntime + type ReportEnvironmentAgent struct + LoadTime int + Runtime string + Version string + type ReportEnvironmentHost struct + BootID string + type ReportEnvironmentOS struct + CPUs []ReportEnvironmentOSCPU + FreeMem uint64 + Hostname string + Linux *ReportEnvironmentOSLinux + TotalMem uint64 + UsedMem uint64 + type ReportEnvironmentOSCPU struct + Times ReportEnvironmentOSCPUTimes + type ReportEnvironmentOSCPUTimes struct + Idle uint64 + Irq uint64 + Nice uint64 + Sys uint64 + User uint64 + type ReportEnvironmentOSLinux struct + PID *ReportEnvironmentOSLinuxPID + type ReportEnvironmentOSLinuxPID struct + Self *ReportEnvironmentOSLinuxPIDSelf + type ReportEnvironmentOSLinuxPIDSelf struct + Stat *ReportEnvironmentOSLinuxPIDSelfStat + StatStart *ReportEnvironmentOSLinuxPIDSelfStat + Status *ReportEnvironmentOSLinuxPIDSelfStatus + type ReportEnvironmentOSLinuxPIDSelfStat struct + Cstime uint64 + Cutime uint64 + Stime uint64 + Utime uint64 + type ReportEnvironmentOSLinuxPIDSelfStatus struct + FDSize int32 + Threads int32 + VMRSS uint64 + type ReportEnvironmentRuntime struct + Name string + Version string + type Reporter func(report *Report) error + type TestPluginConfig struct + type UUID [16]byte + func (uuid UUID) String() string