Versions in this module Expand all Collapse all v1 v1.0.3 Jul 30, 2024 Changes in this version + const AppServiceContextKey + const DEVICENAME + const DefaultPipelineId + const PIPELINEID + const PROFILENAME + const ProfileSuffixPlaceholder + const RECEIVEDTOPIC + const SOURCENAME + type AppFunction = func(appCxt AppFunctionContext, data interface{}) (bool, interface{}) + type AppFunctionContext interface + AddValue func(key string, value string) + ApplyValues func(format string) (string, error) + Clone func() AppFunctionContext + CommandClient func() interfaces.CommandClient + CorrelationID func() string + DeviceClient func() interfaces.DeviceClient + DeviceProfileClient func() interfaces.DeviceProfileClient + DeviceServiceClient func() interfaces.DeviceServiceClient + EventClient func() interfaces.EventClient + GetAllValues func() map[string]string + GetDeviceResource func(profileName string, resourceName string) (dtos.DeviceResource, error) + GetValue func(key string) (string, bool) + InputContentType func() string + LoggingClient func() logger.LoggingClient + MetricsManager func() bootstrapInterfaces.MetricsManager + NotificationClient func() interfaces.NotificationClient + PipelineId func() string + Publish func(data any, contentType string) error + PublishWithTopic func(topic string, data any, contentType string) error + ReadingClient func() interfaces.ReadingClient + RemoveValue func(key string) + ResponseContentType func() string + ResponseData func() []byte + SecretProvider func() bootstrapInterfaces.SecretProvider + SetResponseContentType func(string) + SetResponseData func(data []byte) + SetRetryData func(data []byte) + SubscriptionClient func() interfaces.SubscriptionClient + type ApplicationService interface + AddBackgroundPublisher func(capacity int) (BackgroundPublisher, error) + AddBackgroundPublisherWithTopic func(capacity int, topic string) (BackgroundPublisher, error) + AddCustomRoute func(route string, authentication Authentication, handler echo.HandlerFunc, ...) error + AddFunctionsPipelineForTopics func(id string, topic []string, transforms ...AppFunction) error + AddRoute func(route string, handler func(http.ResponseWriter, *http.Request), ...) error + AppContext func() context.Context + ApplicationSettings func() map[string]string + BuildContext func(correlationId string, contentType string) AppFunctionContext + CommandClient func() interfaces.CommandClient + DeviceClient func() interfaces.DeviceClient + DeviceProfileClient func() interfaces.DeviceProfileClient + DeviceServiceClient func() interfaces.DeviceServiceClient + EventClient func() interfaces.EventClient + GetAppSetting func(setting string) (string, error) + GetAppSettingStrings func(setting string) ([]string, error) + GetConfig func() common.ConfigurationStruct + ListenForCustomConfigChanges func(configToWatch interface{}, sectionName string, ...) error + LoadConfigurableFunctionPipelines func() (map[string]FunctionPipeline, error) + LoadCustomConfig func(config UpdatableConfig, sectionName string) error + LoggingClient func() logger.LoggingClient + MetricsManager func() bootstrapInterfaces.MetricsManager + NotificationClient func() interfaces.NotificationClient + Publish func(data any, contentType string) error + PublishWithTopic func(topic string, data any, contentType string) error + ReadingClient func() interfaces.ReadingClient + RegisterCustomStoreFactory func(name string, ...) error + RegisterCustomTriggerFactory func(name string, factory func(TriggerConfig) (Trigger, error)) error + RegistryClient func() registry.Client + RemoveAllFunctionPipelines func() + RequestTimeout func() time.Duration + Run func() error + SecretProvider func() bootstrapInterfaces.SecretProvider + SetDefaultFunctionsPipeline func(transforms ...AppFunction) error + Stop func() + SubscriptionClient func() interfaces.SubscriptionClient + type Authentication bool + const Authenticated + const Unauthenticated + type BackgroundMessage interface + Message func() types.MessageEnvelope + Topic func() string + type BackgroundPublisher interface + Publish func(payload []byte, context AppFunctionContext) error + type FunctionPipeline struct + Hash string + Id string + MessageProcessingTime gometrics.Timer + MessagesProcessed gometrics.Counter + ProcessingErrors gometrics.Counter + Topics []string + Transforms []AppFunction + type PipelineResponseHandler func(ctx AppFunctionContext, pipeline *FunctionPipeline) error + type StoreClient interface + Disconnect func() error + RemoveFromStore func(o StoredObject) error + RetrieveFromStore func(appServiceKey string) (objects []StoredObject, err error) + Store func(o StoredObject) (id string, err error) + Update func(o StoredObject) error + type StoredObject struct + AppServiceKey string + ContextData map[string]string + CorrelationID string + ID string + Payload []byte + PipelineId string + PipelinePosition int + RetryCount int + Version string + func NewStoredObject(appServiceKey string, payload []byte, pipelineId string, pipelinePosition int, ...) StoredObject + func (o *StoredObject) ValidateContract(IDRequired bool) error + type Trigger interface + Initialize func(wg *sync.WaitGroup, ctx context.Context, background <-chan BackgroundMessage) (bootstrap.Deferred, error) + type TriggerConfig struct + ConfigLoader TriggerConfigLoader + ContextBuilder TriggerContextBuilder + Logger logger.LoggingClient + MessageReceived TriggerMessageHandler + type TriggerConfigLoader func(config UpdatableConfig, sectionName string) error + type TriggerContextBuilder func(env types.MessageEnvelope) AppFunctionContext + type TriggerMessageHandler func(ctx AppFunctionContext, envelope types.MessageEnvelope, ...) error + type TriggerMessageProcessor func(ctx AppFunctionContext, envelope types.MessageEnvelope) error + type UpdatableConfig interface