vzutils

package
v0.0.0-...-f30a32e Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandlerFn

type ErrorHandlerFn func(id uuid.UUID, orgID uuid.UUID, uid string, err error)

ErrorHandlerFn is the function signature for the function that should be called when the VizierHandlerFn returns an error.

type VizierHandlerFn

type VizierHandlerFn func(id uuid.UUID, orgID uuid.UUID, uid string) error

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.

func (*Watcher) Stop

func (w *Watcher) Stop()

Stop stops the watcher.

Jump to

Keyboard shortcuts

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