scheduler

package
v0.2502.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 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.

Types

type Application added in v0.2502.0

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

Application is a scheduler application.

func New

New constructs a new scheduler application.

func (*Application) BeginBlock added in v0.2502.0

func (app *Application) BeginBlock(ctx *api.Context) error

BeginBlock implements api.Application.

func (*Application) Blessed added in v0.2502.0

func (app *Application) Blessed() bool

Blessed implements api.Application.

func (*Application) Dependencies added in v0.2502.0

func (app *Application) Dependencies() []string

Dependencies implements api.Application.

func (*Application) EndBlock added in v0.2502.0

func (app *Application) EndBlock(ctx *api.Context) (types.ResponseEndBlock, error)

EndBlock implements api.Application.

func (*Application) ExecuteMessage added in v0.2502.0

func (app *Application) ExecuteMessage(ctx *api.Context, kind, msg any) (any, error)

ExecuteMessage implements api.MessageSubscriber.

func (*Application) ExecuteTx added in v0.2502.0

func (app *Application) ExecuteTx(*api.Context, *transaction.Transaction) error

ExecuteTx implements api.Application.

func (*Application) ID added in v0.2502.0

func (app *Application) ID() uint8

ID implements api.Application.

func (*Application) InitChain added in v0.2502.0

func (app *Application) InitChain(ctx *abciAPI.Context, req types.RequestInitChain, doc *genesis.Document) error

func (*Application) Methods added in v0.2502.0

func (app *Application) Methods() []transaction.MethodName

Methods implements api.Application.

func (*Application) Name added in v0.2502.0

func (app *Application) Name() string

Name implements api.Application.

func (*Application) OnCleanup added in v0.2502.0

func (app *Application) OnCleanup()

OnCleanup implements api.Application.

func (*Application) Subscribe added in v0.2502.0

func (app *Application) Subscribe()

Subscribe implements api.Application.

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 (f *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