Versions in this module Expand all Collapse all v1 v1.0.1 Jan 18, 2024 v1.0.0 Jan 10, 2024 Changes in this version + const COMPLETED + const FAILED + const INITIALIZED + const INITIALIZING + const INIT_FAILED + const STARTED + const STOPPED + const TriggerEventType + func AppendEventDataToContext(parentCtx context.Context, data map[string]string) context.Context + func ExtractEventDataFromContext(ctx context.Context) (map[string]string, bool) + func Factories() map[string]Factory + func GetHandleStartTimeFromContext(ctx context.Context) time.Time + func GetHandlerEventIdFromContext(ctx context.Context) string + func GetLogger(ref string) log.Logger + func LegacyRegister(ref string, f Factory) error + func NewContextWithEventId(parentCtx context.Context, eventId string) context.Context + func NewHandlerContext(parentCtx context.Context, config *HandlerConfig) context.Context + func PostHandlerEvent(hStatus Status, hName, tName string, data map[string]string) + func PostTriggerEvent(tStatus Status, name string) + func Register(trigger Trigger, f Factory) error + type ActionConfig struct + Act action.Action + If string + Input map[string]interface{} + Output map[string]interface{} + type Config struct + Handlers []*HandlerConfig + Id string + Ref string + Settings map[string]interface{} + Type string + func (c *Config) FixUp(md *Metadata, resolver resolve.CompositeResolver) error + type Descriptor struct + ID string + Version string + type EventFlowControlAware interface + Pause func() error + Resume func() error + type Factory interface + Metadata func() *Metadata + New func(config *Config) (Trigger, error) + func GetFactory(ref string) Factory + type Handler interface + Handle func(ctx context.Context, triggerData interface{}) (map[string]interface{}, error) + Logger func() log.Logger + Name func() string + Schemas func() *SchemaConfig + Settings func() map[string]interface{} + func NewHandler(config *HandlerConfig, acts []action.Action, mf mapper.Factory, ...) (Handler, error) + type HandlerConfig struct + Actions []*ActionConfig + Name string + Schemas *SchemaConfig + Settings map[string]interface{} + func (hc *HandlerConfig) UnmarshalJSON(d []byte) error + type HandlerEvent interface + HandlerName func() string + Status func() Status + Tags func() map[string]string + TriggerName func() string + type HandlerEventConfig interface + SetDefaultEventData func(data map[string]string) + type HandlerInfo struct + EventId string + Name string + StartTime time.Time + func HandlerFromContext(ctx context.Context) (*HandlerInfo, bool) + type InitContext interface + GetHandlers func() []Handler + Logger func() log.Logger + type Metadata struct + HandlerSettings map[string]data.TypedValue + ID string + Output map[string]data.TypedValue + Reply map[string]data.TypedValue + Settings map[string]data.TypedValue + func NewMetadata(mdStructs ...interface{}) *Metadata + type ReconfigurableTrigger interface + Reconfigure func(config *Config, handlers []Handler) error + type SchemaConfig struct + Output map[string]interface{} + Reply map[string]interface{} + type Status string + func (s Status) String() string + type Trigger interface + Initialize func(ctx InitContext) error + type TriggerEvent interface + Name func() string + Status func() Status