Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter func(*scheduler.CommitteeNode) bool
Filter is filter function for the committee watcher. It should return false for any members which should be excluded.
func IgnoreNodeFilter ¶ added in v0.2010.0
IgnoreNodeFilter is a committee watcher filter that filters out nodes based on their public key.
type Watcher ¶
type Watcher interface { // Nodes returns a node descriptor lookup interface that watches all nodes in the committee. Nodes() nodes.NodeDescriptorLookup // EpochTransition signals an epoch transition to the committee watcher. EpochTransition(ctx context.Context, height int64) error }
Watcher is the committee watcher interface.
func NewWatcher ¶
func NewWatcher( ctx context.Context, scheduler scheduler.Backend, registry registry.Backend, runtimeID common.Namespace, kind scheduler.CommitteeKind, options ...WatcherOption, ) (Watcher, error)
NewWatcher creates a new committee watcher.
type WatcherOption ¶
type WatcherOption func(cw *committeeWatcher)
WatcherOption is an option for NewWatcher.
func WithAutomaticEpochTransitions ¶
func WithAutomaticEpochTransitions() WatcherOption
WithAutomaticEpochTransitions is an option for enabling automatic epoch transitions in the committee watcher. Committees will be updated whenever the scheduler elects new committees.
func WithFilter ¶
func WithFilter(f Filter) WatcherOption
WithFilter is an option that adds a given filter to the committee watcher.
Click to show internal directories.
Click to hide internal directories.