model

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventInstantiationAttemptedTrace

type EventInstantiationAttemptedTrace struct {
	Event   event.IEvent
	Element schema.FlowNodeInterface
}

func (EventInstantiationAttemptedTrace) TraceInterface

func (e EventInstantiationAttemptedTrace) TraceInterface()

type Model

type Model struct {
	Element *schema.Definitions
	// contains filtered or unexported fields
}

func New

func New(element *schema.Definitions, options ...Option) *Model

func (*Model) ConsumeEvent

func (model *Model) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)

func (*Model) FindProcessBy

func (model *Model) FindProcessBy(f func(*process.Process) bool) (result *process.Process, found bool)

func (*Model) NewEventDefinitionInstance

func (model *Model) NewEventDefinitionInstance(def schema.EventDefinitionInterface) (event.IDefinitionInstance, error)

func (*Model) RegisterEventConsumer

func (model *Model) RegisterEventConsumer(ev event.IConsumer) (err error)

func (*Model) Run

func (model *Model) Run(ctx context.Context) (err error)

type Option

type Option func(context.Context, *Model) context.Context

func WithContext

func WithContext(newCtx context.Context) Option

WithContext will pass a given context to a new model instead of implicitly generated one

func WithEventDefinitionInstanceBuilder

func WithEventDefinitionInstanceBuilder(builder event.IDefinitionInstanceBuilder) Option

func WithIdGenerator

func WithIdGenerator(builder id.IGeneratorBuilder) Option

func WithTracer

func WithTracer(tracer tracing.ITracer) Option

WithTracer overrides model's tracer

Jump to

Keyboard shortcuts

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