data

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: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(typeName string, factory Factory)

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

Types

type Config

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

Config contains data engine configuration.

type DataSubscription

type DataSubscription struct {
	SymbolID int
	Endpoint string                // regional endpoint override
	Depth    *adapter.DepthOptions // nil if no depth subscription
	Trade    bool                  // trade tick subscription
	AggTrade bool                  // aggregate trade subscription
	Kline    *adapter.KlineOptions // nil if no kline subscription
}

DataSubscription holds parsed subscription config for a single symbol

type Engine

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

Engine manages market data processing including orderbook management. It constructs actors from config via the factory registry.

func NewEngine

func NewEngine(cat *catalog.Catalog, msgBus *msgbus.MsgBus, c *cache.Cache) *Engine

NewEngine creates a new data engine.

func (*Engine) Connect

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

Connect establishes WebSocket connections to all data sources. Subscriptions are already prepared during Init().

func (*Engine) Disconnect

func (e *Engine) Disconnect()

Disconnect disconnects from all data sources.

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, subscriptions []adapter.DataRouterEntry)

Init constructs actors from config, registers them and command processors. subscriptions are the data router entries from the node-level datarouter config.

func (*Engine) Start

func (e *Engine) Start()

func (*Engine) Stop

func (e *Engine) Stop()

type Factory

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

Factory is a constructor function that creates a data actor.

Directories

Path Synopsis
actor

Jump to

Keyboard shortcuts

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