Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeforeCallback ¶ added in v1.0.6
type Callback ¶
type Callback interface {
Callback(topic string, ctx *memstore.Store, events ...interface{}) error
}
因为会导致重复订阅,所以必须用interface的形式 type Callback = func(string, context.Context, ...interface{}) error
type CallbackFunc ¶
type Controller ¶
type Cycle ¶ added in v1.0.4
type Cycle interface { // 设置发布时回调 SetCycleBefore(topic string, callback BeforeCallback) // 设置同步完成时回调 SetCycleAfterSync(topic string, callback CycleCallback) // 设置全部完成时回调 SetCycleAfterAll(topic string, callback CycleCallback) // 设置错误时回调 SetCycleError(topic string, onError ErrorCallback) }
type CycleCallback ¶ added in v1.0.4
type ErrorCallback ¶ added in v1.0.4
type EventBus ¶
type EventBus interface { Publisher Subscriber Controller Cycle }
Click to show internal directories.
Click to hide internal directories.