committee

package
v0.20.9 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NotReady is the name of StateNotReady.
	NotReady = "NotReady"
	// WaitingForResults is the name of StateWaitingForResults.
	WaitingForResults = "WaitingForResults"
	// WaitingForEvent is the name of StateWaitingForEvent.
	WaitingForEvent = "WaitingForEvent"
	// ProcessingMerge is the name of StateProcessingMerge.
	ProcessingMerge = "ProcessingMerge"
	// WaitingForFinalize is the name of StateWaitingForFinalize.
	WaitingForFinalize = "WaitingForFinalize"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node is a committee node.

func NewNode

func NewNode(commonNode *committee.Node, commonCfg workerCommon.Config, roleProvider registration.RoleProvider) (*Node, error)

func (*Node) Cleanup

func (n *Node) Cleanup()

Cleanup performs the service specific post-termination cleanup.

func (*Node) HandleEpochTransitionLocked

func (n *Node) HandleEpochTransitionLocked(epoch *committee.EpochSnapshot)

HandleEpochTransitionLocked implements NodeHooks. Guarded by n.commonNode.CrossNode.

func (*Node) HandleNewBlockEarlyLocked

func (n *Node) HandleNewBlockEarlyLocked(blk *block.Block)

HandleNewBlockEarlyLocked implements NodeHooks. Guarded by n.commonNode.CrossNode.

func (*Node) HandleNewBlockLocked

func (n *Node) HandleNewBlockLocked(blk *block.Block)

HandleNewBlockLocked implements NodeHooks. Guarded by n.commonNode.CrossNode.

func (*Node) HandleNewEventLocked

func (n *Node) HandleNewEventLocked(ev *roothash.Event)

HandleNewEventLocked implements NodeHooks. Guarded by n.commonNode.CrossNode.

func (*Node) HandleNodeUpdateLocked

func (n *Node) HandleNodeUpdateLocked(update *runtimeCommittee.NodeUpdate, snapshot *committee.EpochSnapshot)

HandleNodeUpdateLocked implements NodeHooks. Guarded by n.commonNode.CrossNode.

func (*Node) HandlePeerMessage

func (n *Node) HandlePeerMessage(ctx context.Context, message *p2p.Message) (bool, error)

HandlePeerMessage implements NodeHooks.

func (*Node) HandleResultsFromExecutorWorkerLocked

func (n *Node) HandleResultsFromExecutorWorkerLocked(spanCtx opentracing.SpanContext, commit *commitment.ExecutorCommitment)

HandleResultsFromExecutorWorkerLocked processes results from an executor worker. Guarded by n.commonNode.CrossNode.

func (*Node) Initialized

func (n *Node) Initialized() <-chan struct{}

Initialized returns a channel that will be closed when the node is initialized and ready to service requests.

func (*Node) Name

func (n *Node) Name() string

Name returns the service name.

func (*Node) Quit

func (n *Node) Quit() <-chan struct{}

Quit returns a channel that will be closed when the service terminates.

func (*Node) Start

func (n *Node) Start() error

Start starts the service.

func (*Node) Stop

func (n *Node) Stop()

Stop halts the service.

func (*Node) WatchStateTransitions

func (n *Node) WatchStateTransitions() (<-chan NodeState, *pubsub.Subscription)

WatchStateTransitions subscribes to the node's state transitions.

type NodeState

type NodeState interface {
	// Name returns the name of the state.
	Name() StateName
}

NodeState is a node's state.

type StateName

type StateName string

StateName is a symbolic state without the attached values.

type StateNotReady

type StateNotReady struct {
}

StateNotReady is the not ready state.

func (StateNotReady) Name

func (s StateNotReady) Name() StateName

Name returns the name of the state.

func (StateNotReady) String

func (s StateNotReady) String() string

String returns a string representation of the state.

type StateProcessingMerge

type StateProcessingMerge struct {
	// contains filtered or unexported fields
}

StateProcessingMerge is the processing merge state.

func (StateProcessingMerge) Name

Name returns the name of the state.

func (StateProcessingMerge) String

func (s StateProcessingMerge) String() string

String returns a string representation of the state.

type StateWaitingForEvent

type StateWaitingForEvent struct {
	// contains filtered or unexported fields
}

StateWaitingForEvent is the waiting for event state.

func (StateWaitingForEvent) Name

Name returns the name of the state.

func (StateWaitingForEvent) String

func (s StateWaitingForEvent) String() string

String returns a string representation of the state.

type StateWaitingForFinalize

type StateWaitingForFinalize struct {
}

StateWaitingForFinalize is the waiting for finalize state.

func (StateWaitingForFinalize) Name

Name returns the name of the state.

func (StateWaitingForFinalize) String

func (s StateWaitingForFinalize) String() string

String returns a string representation of the state.

type StateWaitingForResults

type StateWaitingForResults struct {
	// contains filtered or unexported fields
}

StateWaitingForResults is the waiting for results state.

func (StateWaitingForResults) Name

Name returns the name of the state.

func (StateWaitingForResults) String

func (s StateWaitingForResults) String() string

String returns a string representation of the state.

Jump to

Keyboard shortcuts

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