Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBusy = errors.New("busy scheduling previous update")
Functions ¶
This section is empty.
Types ¶
type DiskManager ¶
type GamePlayer ¶
type GamePlayer interface { ProgressGame(ctx context.Context) types.GameStatus Status() types.GameStatus }
type PlayerCreator ¶
type PlayerCreator func(address common.Address, dir string) (GamePlayer, error)
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(logger log.Logger, m SchedulerMetricer, disk DiskManager, maxConcurrency uint, createPlayer PlayerCreator) *Scheduler
func (*Scheduler) ThreadActive ¶
func (s *Scheduler) ThreadActive()
func (*Scheduler) ThreadIdle ¶
func (s *Scheduler) ThreadIdle()
type SchedulerMetricer ¶
type SchedulerMetricer interface { RecordGamesStatus(inProgress, defenderWon, challengerWon int) RecordGameUpdateScheduled() RecordGameUpdateCompleted() IncActiveExecutors() DecActiveExecutors() IncIdleExecutors() DecIdleExecutors() }
Click to show internal directories.
Click to hide internal directories.