Documentation ¶
Index ¶
- Constants
- func NewFunctionPipeline(id string, topics []string, transforms []interfaces.AppFunction) interfaces.FunctionPipeline
- type GolangRuntime
- func (gr *GolangRuntime) AddFunctionsPipeline(id string, topics []string, transforms []interfaces.AppFunction) error
- func (gr *GolangRuntime) ClearAllFunctionsPipelineTransforms()
- func (gr *GolangRuntime) DecodeMessage(appContext *appfunction.Context, envelope types.MessageEnvelope) (interface{}, *MessageError, bool)
- func (gr *GolangRuntime) ExecutePipeline(target interface{}, appContext *appfunction.Context, ...) *MessageError
- func (gr *GolangRuntime) GetDefaultPipeline() *interfaces.FunctionPipeline
- func (gr *GolangRuntime) GetMatchingPipelines(incomingTopic string) []*interfaces.FunctionPipeline
- func (gr *GolangRuntime) GetPipelineById(id string) *interfaces.FunctionPipeline
- func (gr *GolangRuntime) ProcessMessage(appContext *appfunction.Context, target interface{}, ...) *MessageError
- func (gr *GolangRuntime) SetDefaultFunctionsPipeline(transforms []interfaces.AppFunction)
- func (gr *GolangRuntime) SetFunctionsPipelineTopics(id string, topics []string)
- func (gr *GolangRuntime) SetFunctionsPipelineTransforms(id string, transforms []interfaces.AppFunction)
- func (gr *GolangRuntime) StartStoreAndForward(appWg *sync.WaitGroup, appCtx context.Context, enabledWg *sync.WaitGroup, ...)
- type MessageError
Constants ¶
const ( TopicWildCard = "#" TopicLevelSeparator = "/" )
Variables ¶
This section is empty.
Functions ¶
func NewFunctionPipeline ¶
func NewFunctionPipeline(id string, topics []string, transforms []interfaces.AppFunction) interfaces.FunctionPipeline
Types ¶
type GolangRuntime ¶
type GolangRuntime struct { TargetType interface{} ServiceKey string // contains filtered or unexported fields }
GolangRuntime represents the golang runtime environment
func NewGolangRuntime ¶
func NewGolangRuntime(serviceKey string, targetType interface{}, dic *di.Container) *GolangRuntime
NewGolangRuntime creates and initializes the GolangRuntime instance
func (*GolangRuntime) AddFunctionsPipeline ¶
func (gr *GolangRuntime) AddFunctionsPipeline(id string, topics []string, transforms []interfaces.AppFunction) error
AddFunctionsPipeline is thread safe to set transforms
func (*GolangRuntime) ClearAllFunctionsPipelineTransforms ¶
func (gr *GolangRuntime) ClearAllFunctionsPipelineTransforms()
ClearAllFunctionsPipelineTransforms clears the transforms for all existing function pipelines.
func (*GolangRuntime) DecodeMessage ¶
func (gr *GolangRuntime) DecodeMessage(appContext *appfunction.Context, envelope types.MessageEnvelope) (interface{}, *MessageError, bool)
DecodeMessage decode the message wrapped in the MessageEnvelope and return the data to be processed.
func (*GolangRuntime) ExecutePipeline ¶
func (gr *GolangRuntime) ExecutePipeline( target interface{}, appContext *appfunction.Context, pipeline *interfaces.FunctionPipeline, startPosition int, isRetry bool) *MessageError
func (*GolangRuntime) GetDefaultPipeline ¶
func (gr *GolangRuntime) GetDefaultPipeline() *interfaces.FunctionPipeline
func (*GolangRuntime) GetMatchingPipelines ¶
func (gr *GolangRuntime) GetMatchingPipelines(incomingTopic string) []*interfaces.FunctionPipeline
func (*GolangRuntime) GetPipelineById ¶
func (gr *GolangRuntime) GetPipelineById(id string) *interfaces.FunctionPipeline
func (*GolangRuntime) ProcessMessage ¶
func (gr *GolangRuntime) ProcessMessage(appContext *appfunction.Context, target interface{}, pipeline *interfaces.FunctionPipeline) *MessageError
ProcessMessage sends the contents of the message through the functions pipeline
func (*GolangRuntime) SetDefaultFunctionsPipeline ¶
func (gr *GolangRuntime) SetDefaultFunctionsPipeline(transforms []interfaces.AppFunction)
SetDefaultFunctionsPipeline sets the default function pipeline
func (*GolangRuntime) SetFunctionsPipelineTopics ¶
func (gr *GolangRuntime) SetFunctionsPipelineTopics(id string, topics []string)
SetFunctionsPipelineTopics sets the topics for an existing function pipeline. Non-existent pipelines are ignored
func (*GolangRuntime) SetFunctionsPipelineTransforms ¶
func (gr *GolangRuntime) SetFunctionsPipelineTransforms(id string, transforms []interfaces.AppFunction)
SetFunctionsPipelineTransforms sets the transforms for an existing function pipeline. Non-existent pipelines are ignored