committee

package
v0.2402.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WaitingForBatch is the name of StateWaitingForBatch.
	WaitingForBatch = "WaitingForBatch"
	// WaitingForTxs is the name of the StateWaitingForTxs.
	WaitingForTxs = "WaitingForTxs"
	// WaitingForEvent is the name of StateWaitingForEvent.
	WaitingForEvent = "WaitingForEvent"
	// ProcessingBatch is the name of StateProcessingBatch.
	ProcessingBatch = "ProcessingBatch"
)

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 commonWorker.Config,
	roleProvider registration.RoleProvider,
) (*Node, error)

NewNode initializes a new executor node.

func (*Node) Cleanup

func (n *Node) Cleanup()

Cleanup performs the service specific post-termination cleanup.

func (*Node) GetStatus added in v0.2202.0

func (n *Node) GetStatus() (*api.Status, error)

GetStatus returns the executor committee node status.

func (*Node) HandleNewBlockEarlyLocked

func (n *Node) HandleNewBlockEarlyLocked(*runtime.BlockInfo)

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

func (*Node) HandleNewBlockLocked

func (n *Node) HandleNewBlockLocked(bi *runtime.BlockInfo)

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

func (*Node) HandleRuntimeHostEventLocked added in v0.2202.0

func (n *Node) HandleRuntimeHostEventLocked(ev *host.Event)

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 StateProcessingBatch

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

StateProcessingBatch is the processing batch state.

func (*StateProcessingBatch) Cancel added in v0.2300.0

func (s *StateProcessingBatch) Cancel(cause error)

Cancel invokes the cancellation function and waits for the processing to actually stop.

func (StateProcessingBatch) Name

Name returns the name of the state.

func (StateProcessingBatch) String

func (s StateProcessingBatch) String() string

String returns a string representation of the state.

type StateWaitingForBatch

type StateWaitingForBatch struct{}

StateWaitingForBatch is the waiting for batch state.

func (StateWaitingForBatch) Name

Name returns the name of the state.

func (StateWaitingForBatch) String

func (s StateWaitingForBatch) 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 StateWaitingForTxs added in v0.2200.0

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

func (StateWaitingForTxs) Cancel added in v0.2300.0

func (s StateWaitingForTxs) Cancel()

Cancel invokes the cancellation function and waits for the fetching to actually stop.

func (StateWaitingForTxs) Name added in v0.2200.0

func (s StateWaitingForTxs) Name() StateName

Name returns the name of the state.

func (StateWaitingForTxs) String added in v0.2200.0

func (s StateWaitingForTxs) 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