scheduler

package
v0.2011.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 31 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)

	// KeyElected is the ABCI event attribute key for the elected
	// committee types.
	KeyElected = []byte("elected")
)
View Source
var (
	RNGContextExecutor   = []byte("EkS-ABCI-Compute")
	RNGContextStorage    = []byte("EkS-ABCI-Storage")
	RNGContextValidators = []byte("EkS-ABCI-Validators")
	RNGContextEntities   = []byte("EkS-ABCI-Entities")
)

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)
}

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

Jump to

Keyboard shortcuts

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