Documentation ¶
Index ¶
- type Instance
- func (instance *Instance) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)
- func (instance *Instance) FlowNodeMapping() *flow_node.FlowNodeMapping
- func (instance *Instance) Id() id.Id
- func (instance *Instance) Process() *schema.Process
- func (instance *Instance) RegisterEventConsumer(ev event.IConsumer) (err error)
- func (instance *Instance) StartAll(ctx context.Context) (err error)
- func (instance *Instance) StartWith(ctx context.Context, startEvent schema.StartEventInterface) (err error)
- func (instance *Instance) WaitUntilComplete(ctx context.Context) (complete bool)
- type InstantiationTrace
- type Option
- func WithContext(newCtx context.Context) Option
- func WithDataObjects(dataObjects map[string]any) Option
- func WithEventDefinitionInstanceBuilder(builder event.IDefinitionInstanceBuilder) Option
- func WithEventEgress(source event.ISource) Option
- func WithEventIngress(consumer event.IConsumer) Option
- func WithIdGenerator(builder id.IGeneratorBuilder) Option
- func WithLocator(locator data.IFlowDataLocator) Option
- func WithTracer(tracer tracing.ITracer) Option
- func WithVariables(variables map[string]any) Option
- type Trace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct { Tracer tracing.ITracer Locator data.IFlowDataLocator EventIngress event.IConsumer EventEgress event.ISource // contains filtered or unexported fields }
func NewInstance ¶
func (*Instance) ConsumeEvent ¶
func (*Instance) FlowNodeMapping ¶
func (instance *Instance) FlowNodeMapping() *flow_node.FlowNodeMapping
func (*Instance) RegisterEventConsumer ¶
func (*Instance) StartAll ¶
StartAll explicitly starts the instance by triggering all start events, if any
type InstantiationTrace ¶
InstantiationTrace denotes instantiation of a given process
func (InstantiationTrace) TraceInterface ¶
func (i InstantiationTrace) TraceInterface()
type Option ¶
Option allows to modify configuration of an instance in a flexible fashion (as its just a modification function)
It also allows to augment or replace the context.
func WithContext ¶
WithContext will pass a given context to a new instance instead of implicitly generated one
func WithDataObjects ¶ added in v0.2.3
func WithEventDefinitionInstanceBuilder ¶
func WithEventDefinitionInstanceBuilder(builder event.IDefinitionInstanceBuilder) Option
func WithEventEgress ¶
func WithEventIngress ¶
func WithIdGenerator ¶
func WithIdGenerator(builder id.IGeneratorBuilder) Option
func WithLocator ¶ added in v0.7.0
func WithLocator(locator data.IFlowDataLocator) Option
func WithTracer ¶
WithTracer overrides instance's tracer
func WithVariables ¶
Click to show internal directories.
Click to hide internal directories.