Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorHandlerFn ¶
ErrorHandlerFn is the function signature for the function that should be called when the VizierHandlerFn returns an error.
type VizierHandlerFn ¶
VizierHandlerFn is the function signature for the function that is run for active and newly connected Viziers.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher tracks active Viziers and executes the registered task for each Vizier.
func NewWatcher ¶
func NewWatcher(nc *nats.Conn, vzmgrClient vzmgrpb.VZMgrServiceClient, fromShardID string, toShardID string) (*Watcher, error)
NewWatcher creates a new vizier watcher.
func (*Watcher) RegisterErrorHandler ¶
func (w *Watcher) RegisterErrorHandler(fn ErrorHandlerFn)
RegisterErrorHandler registers the function that should be called when the VizierHandler returns an error.
func (*Watcher) RegisterVizierHandler ¶
func (w *Watcher) RegisterVizierHandler(fn VizierHandlerFn) error
RegisterVizierHandler registers the function that should be called on all currently active Viziers, and any newly connected Viziers.
Click to show internal directories.
Click to hide internal directories.