execution

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(typeName string, factory Factory)

Register registers an execution actor factory under the given type name. Typically called from init() in each execution actor package.

Types

type Config

type Config struct {
	Actor []actor.Entry `yaml:"actor"`
}

Config contains execution engine configuration.

type Engine

type Engine struct {
	engine.EngineBase
	// contains filtered or unexported fields
}

Engine manages order execution and maintains open order state. It constructs actors from config via the factory registry.

func NewEngine

func NewEngine(router *adapter.ExecutionRouter, msgBus *msgbus.MsgBus, cache *cache.Cache) *Engine

NewEngine creates a new execution engine

func (*Engine) Connect

func (e *Engine) Connect(ctx context.Context) error

Connect establishes WebSocket connections to all execution clients. Subscriptions are already prepared during Init().

func (*Engine) Disconnect

func (e *Engine) Disconnect()

Disconnect disconnects the execution router

func (*Engine) Execute

func (e *Engine) Execute(cmd msgbus.Command, bus *msgbus.MsgBus)

Execute routes commands to the appropriate handler.

func (*Engine) Init

func (e *Engine) Init(config Config)

Init constructs actors from config, registers them and command processors.

func (*Engine) Start

func (e *Engine) Start()

Start starts the execution engine

func (*Engine) Stop

func (e *Engine) Stop()

Stop stops the execution engine

type Factory

type Factory func(bus *msgbus.MsgBus, c *cache.Cache) actor.Actor

Factory is a constructor function that creates an execution actor.

Directories

Path Synopsis
actor
oms

Jump to

Keyboard shortcuts

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