Documentation ¶
Index ¶
- Variables
- type GameTypeRegistry
- func (r *GameTypeRegistry) CreateBondContract(game types.GameMetadata) (claims.BondContract, error)
- func (r *GameTypeRegistry) CreatePlayer(game types.GameMetadata, dir string) (scheduler.GamePlayer, error)
- func (r *GameTypeRegistry) RegisterBondContract(gameType faultTypes.GameType, creator claims.BondContractCreator)
- func (r *GameTypeRegistry) RegisterGameType(gameType faultTypes.GameType, creator scheduler.PlayerCreator)
- type OracleRegistry
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 (r *OracleRegistry) Oracles() []keccakTypes.LargePreimageOracle
func (*OracleRegistry) RegisterOracle ¶ added in v1.7.2
func (r *OracleRegistry) RegisterOracle(oracle keccakTypes.LargePreimageOracle)
Click to show internal directories.
Click to hide internal directories.