Documentation ¶
Overview ¶
Package status contains logic reguarding the current Executor state.
Index ¶
- type ReadOnlyStatus
- type Status
- func (s *Status) IncrementTick()
- func (s *Status) IsStarted() bool
- func (s *Status) IsStopped() bool
- func (s *Status) PB() *gdpb.ServerStatus
- func (s *Status) SetIsStarted() error
- func (s *Status) SetIsStopped() error
- func (s *Status) SetStartTime()
- func (s *Status) StartTime() time.Time
- func (s *Status) Tick() id.Tick
- func (s *Status) TickDuration() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadOnlyStatus ¶
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status represents the internal Executor state.
func (*Status) IncrementTick ¶
func (s *Status) IncrementTick()
IncrementTick adds one to the current game tick -- this is called at the beginning of each tick loop.
func (*Status) PB ¶
func (s *Status) PB() *gdpb.ServerStatus
PB exports the Status instance into an associated protobuf.
func (*Status) SetIsStarted ¶
SetIsStarted sets the internal Executor status as running the core loop.
func (*Status) SetIsStopped ¶
SetIsStopped sets the internal Executor status as having finished the core loop. This may be called because the game ended, or if it crashed.
func (*Status) SetStartTime ¶
func (s *Status) SetStartTime()
SetStartTime sets the time at which the server initially started running the core loop.
func (*Status) StartTime ¶
StartTime returns the wall-clock time at which the server started executing the core loop.