api

package
v0.2400.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostStatus added in v0.2200.0

type HostStatus struct {
	// Versions are the locally supported versions.
	Versions []version.Version `json:"versions"`
}

HostStatus is the runtime host status.

type LivenessStatus added in v0.2200.0

type LivenessStatus struct {
	// TotalRounds is the total number of rounds in the last epoch, excluding any rounds generated
	// by the roothash service itself.
	TotalRounds uint64 `json:"total_rounds"`

	// LiveRounds is the number of rounds in which the node positively contributed.
	LiveRounds uint64 `json:"live_rounds"`

	// FinalizedProposals is the number of finalized rounds when a node acted as a proposer
	// with the highest rank.
	FinalizedProposals uint64 `json:"finalized_proposals"`

	// MissedProposals is the number of failed rounds when a node acted as a proposer
	// with the highest rank.
	MissedProposals uint64 `json:"missed_proposals"`
}

LivenessStatus is the liveness status for the current epoch.

type Status

type Status struct {
	// Status is a concise status of the committee node.
	Status StatusState `json:"status"`

	// ActiveVersion is the currently active version.
	ActiveVersion *version.Version `json:"active_version"`

	// LatestRound is the latest runtime round as seen by the committee node.
	LatestRound uint64 `json:"latest_round"`
	// LatestHeight is the consensus layer height containing the runtime block for the latest round.
	LatestHeight int64 `json:"latest_height"`

	// ExecutorRoles are the node's roles in the executor committee.
	ExecutorRoles []scheduler.Role `json:"executor_roles"`
	// SchedulerRank is the position (index) of the node in the committee's scheduling order
	// for the next round.
	SchedulerRank uint64 `json:"scheduler_rank"`
	// Liveness is the node's liveness status for the current epoch.
	Liveness *LivenessStatus `json:"liveness,omitempty"`

	// Peers is the list of peers in the runtime P2P network.
	Peers []string `json:"peers"`

	// Host is the runtime host status.
	Host HostStatus `json:"host"`
}

Status is the common runtime worker status.

type StatusState added in v0.2202.0

type StatusState uint8

StatusState is the concise status state of the common runtime worker.

const (
	// StatusStateReady is the ready status state.
	StatusStateReady StatusState = 0
	// StatusStateWaitingConsensusSync is the waiting for consensus sync status state.
	StatusStateWaitingConsensusSync StatusState = 1
	// StatusStateWaitingRuntimeRegistry is the waiting for runtime registry descriptor status state.
	StatusStateWaitingRuntimeRegistry StatusState = 2
	// StatusStateWaitingKeymanager is the waiting for keymanager status state.
	StatusStateWaitingKeymanager StatusState = 3
	// StatusStateWaitingHostedRuntime is the waiting for the hosted runtime status state.
	StatusStateWaitingHostedRuntime StatusState = 4
	// StatusStateWaitingHistoryReindex is the waiting for runtime history reindex status state.
	StatusStateWaitingHistoryReindex StatusState = 5
	// StatusStateWaitingWorkersInit is the waiting for workers to initialize status state.
	StatusStateWaitingWorkersInit StatusState = 6
	// StatusStateRuntimeSuspended is the runtime suspended status state.
	StatusStateRuntimeSuspended StatusState = 7
)

func (StatusState) MarshalText added in v0.2202.0

func (s StatusState) MarshalText() ([]byte, error)

MarshalText encodes a StatusState into text form.

func (StatusState) String added in v0.2202.0

func (s StatusState) String() string

String returns a string representation of a status state.

func (*StatusState) UnmarshalText added in v0.2202.0

func (s *StatusState) UnmarshalText(text []byte) error

UnmarshalText decodes a text slice into a StatusState.

Jump to

Keyboard shortcuts

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