msg

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventLevelInfo    = 0
	EventLevelWarning = 1
	EventLevelError   = 2
)
View Source
const (
	TypeCreate     = 1
	TypeUpdate     = 2
	TypeDelete     = 3
	TypeActivate   = 4
	TypeDeactivate = 5
	TypeNewJob     = 6
	TypeChange     = 7
	TypeRestart    = 8

	SourceTradingSystem  = "trading-system"
	SourceDataProduct    = "data-product"
	SourceBrokerProduct  = "broker-product"
	SourcePortfolio      = "portfolio"
	SourceTradingSession = "trading-session"

	SourceUploadJob     = "upload-job"
	SourceRollRecalcJob = "rollRecalc-job"

	SourceTrade = "trade"

	SourceConnection = "connection"
	SourceSystem     = "system"

	SourceEvent = "event"
)
View Source
const (
	ExInventory            = "bf.inventory"
	QuInventoryToPortfolio = "bf.inventory:portfolio"
	QuInventoryToCollector = "bf.inventory:collector"
	QuInventoryToStorage   = "bf.inventory:storage"

	ExCollector           = "bf.collector"
	QuCollectorToInternal = "bf.collector:internal"

	ExRuntime            = "bf.runtime"
	QuRuntimeToPortfolio = "bf.runtime:portfolio"

	ExSystem            = "bf.system"
	QuSystemToInventory = "bf.system:inventory"
	QuSystemToCollector = "bf.system:collector"
	QuSystemToPortfolio = "bf.system:portfolio"

	ExEvent      = "bf.event"
	QuAllToEvent = "bf.all:event"
)

Variables

This section is empty.

Functions

func InitMessaging

func InitMessaging(cfg *core.Messaging)

func PublishToExchange

func PublishToExchange(exchange string, message any) error

func ReceiveMessages

func ReceiveMessages(queue string, handler func(m *Message) bool)

func SendEvent

func SendEvent(username string, level EventLevel, title, message string, params map[string]any) error

func SendEventByCode

func SendEventByCode(username string, code string, params map[string]any) error

func SendMessage

func SendMessage(exchange string, source string, msgType int, entity any) error

Types

type Event

type Event struct {
	Username   string
	Level      EventLevel
	EventDate  time.Time
	Code       string
	Title      string
	Message    string
	Parameters map[string]any
}

type EventLevel

type EventLevel int8

type Message

type Message struct {
	Source string
	Type   int
	Entity []byte
}

Jump to

Keyboard shortcuts

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