registry

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedGameType = errors.New("unsupported game type")

Functions

This section is empty.

Types

type GameTypeRegistry

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

func NewGameTypeRegistry

func NewGameTypeRegistry() *GameTypeRegistry

func (*GameTypeRegistry) CreateBondContract added in v1.5.1

func (r *GameTypeRegistry) CreateBondContract(game types.GameMetadata) (claims.BondContract, error)

func (*GameTypeRegistry) CreatePlayer

func (r *GameTypeRegistry) CreatePlayer(game types.GameMetadata, dir string) (scheduler.GamePlayer, error)

CreatePlayer creates a new game player for the given game, using the specified directory for persisting data.

func (*GameTypeRegistry) RegisterBondContract added in v1.5.1

func (r *GameTypeRegistry) RegisterBondContract(gameType faultTypes.GameType, creator claims.BondContractCreator)

func (*GameTypeRegistry) RegisterGameType

func (r *GameTypeRegistry) RegisterGameType(gameType faultTypes.GameType, creator scheduler.PlayerCreator)

RegisterGameType registers a scheduler.PlayerCreator to use for a specific game type. Panics if the same game type is registered multiple times, since this indicates a significant programmer error.

type OracleRegistry added in v1.7.2

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

func NewOracleRegistry added in v1.7.2

func NewOracleRegistry() *OracleRegistry

func (*OracleRegistry) Oracles added in v1.7.2

func (*OracleRegistry) RegisterOracle added in v1.7.2

func (r *OracleRegistry) RegisterOracle(oracle keccakTypes.LargePreimageOracle)

Jump to

Keyboard shortcuts

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