service

package
v0.0.0-...-ac37d82 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

type EventBus interface {
	context.Context
	SendMessage(target uwe.WorkerName, data interface{}) error
	MessageBus() <-chan *Message
}

func NewEventBus

func NewEventBus(name uwe.WorkerName, ctx context.Context, toWorker, fromWorker chan *Message) EventBus

type EventHub

type EventHub struct {
	// contains filtered or unexported fields
}

func NewEventHub

func NewEventHub(defaultChanLen int) *EventHub

func (*EventHub) AddWorker

func (hub *EventHub) AddWorker(name uwe.WorkerName) EventBus

func (*EventHub) Init

func (hub *EventHub) Init() error

func (*EventHub) Run

func (hub *EventHub) Run(ctx uwe.Context) error

type Message

type Message struct {
	UID    int64
	Target uwe.WorkerName
	Sender uwe.WorkerName
	Data   interface{}
}

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(cfg config.Config, keeper db.Storekeeper, hubBus EventBus, logger *logrus.Entry) *Watcher

func (*Watcher) Init

func (watcher *Watcher) Init() error

func (*Watcher) Run

func (watcher *Watcher) Run(ctx uwe.Context) error

Jump to

Keyboard shortcuts

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