scheduler

package
v0.2202.13 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppID is the unique application identifier.
	AppID uint8 = 0x06

	// AppName is the ABCI application name.
	AppName string = "200_scheduler"
)

Variables

View Source
var (
	// EventType is the ABCI event type for scheduler events.
	EventType = api.EventTypeForApp(AppName)

	// QueryApp is a query for filtering events processed by the
	// scheduler application.
	QueryApp = api.QueryForApp(AppName)
)
View Source
var (
	RNGContextExecutor   = []byte("EkS-ABCI-Compute")
	RNGContextValidators = []byte("EkS-ABCI-Validators")
	RNGContextEntities   = []byte("EkS-ABCI-Entities")

	RNGContextRoleWorker       = []byte("Worker")
	RNGContextRoleBackupWorker = []byte("Backup-Worker")
)

Functions

func GetPerm

func GetPerm(beacon []byte, runtimeID common.Namespace, rngCtx []byte, nrNodes int) ([]int, error)

GetPerm generates a permutation that we use to choose nodes from a list of eligible nodes to elect.

func New

func New() api.Application

New constructs a new scheduler application instance.

Types

type Query

type Query interface {
	Validators(context.Context) ([]*scheduler.Validator, error)
	AllCommittees(context.Context) ([]*scheduler.Committee, error)
	KindsCommittees(context.Context, []scheduler.CommitteeKind) ([]*scheduler.Committee, error)
	Genesis(context.Context) (*scheduler.Genesis, error)
	ConsensusParameters(context.Context) (*scheduler.ConsensusParameters, error)
}

Query is the scheduler query interface.

type QueryFactory

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

QueryFactory is the scheduler query factory.

func NewQueryFactory

func NewQueryFactory(state abciAPI.ApplicationQueryState) *QueryFactory

NewQueryFactory returns a new QueryFactory backed by the given state instance.

func (*QueryFactory) QueryAt

func (sf *QueryFactory) QueryAt(ctx context.Context, height int64) (Query, error)

QueryAt returns the scheduler query interface for a specific height.

Directories

Path Synopsis
Package api defines the scheduler application API for other applications.
Package api defines the scheduler application API for other applications.

Jump to

Keyboard shortcuts

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