committee

package
v0.2012.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

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

func IgnoreNodeFilter(pk signature.PublicKey) Filter

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.

Jump to

Keyboard shortcuts

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