trigger

package
v3.1.0-dev.34 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageProcessor

type MessageProcessor interface {
	// MessageReceived provides runtime orchestration to pass the envelope / context to configured pipeline(s)
	MessageReceived(ctx interfaces.AppFunctionContext, envelope types.MessageEnvelope, outputHandler interfaces.PipelineResponseHandler) error
	// ReceivedInvalidMessage is called when an invalid message is received so the metrics counter can be incremented.
	ReceivedInvalidMessage()
}

type ServiceBinding

type ServiceBinding interface {
	// DecodeMessage decodes the message received in the envelope and returns the data to be processed
	DecodeMessage(appContext *appfunction.Context, envelope types.MessageEnvelope) (interface{}, *runtime.MessageError, bool)
	// ProcessMessage provides access to the runtime's ProcessMessage function to process the decoded data
	ProcessMessage(appContext *appfunction.Context, data interface{}, pipeline *interfaces.FunctionPipeline) *runtime.MessageError
	// GetMatchingPipelines provides access to the runtime's GetMatchingPipelines function
	GetMatchingPipelines(incomingTopic string) []*interfaces.FunctionPipeline
	// GetDefaultPipeline provides access to the runtime's GetDefaultPipeline function
	GetDefaultPipeline() *interfaces.FunctionPipeline
	// BuildContext creates a context for a given message envelope
	BuildContext(env types.MessageEnvelope) interfaces.AppFunctionContext
	// SecretProvider provides access to this service's secret provider for the trigger
	SecretProvider() messaging.SecretDataProvider
	// Config provides access to this service's configuration for the trigger
	Config() *common.ConfigurationStruct
	// LoggingClient provides access to this service's logging clietn for the trigger
	LoggingClient() logger.LoggingClient
	// LoadCustomConfig provides access to the service's LoadCustomConfig function
	LoadCustomConfig(config interfaces.UpdatableConfig, sectionName string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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