Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(t *TLM)
Option configures the TLM
func WithController ¶
func WithController(c *config.Configurator) Option
WithController sets the network controller instance that will manage the network for this TLM.
func WithLogger ¶
func WithLogger(l hclog.Logger) Option
WithLogger configures the logger for the team location mapper
func WithSaveState ¶ added in v0.1.7
WithSaveState provides a path to save the tlm data to across application reloads.
func WithStartupWG ¶
WithStartupWG allows a waitgroup to be passed in so the server can notify when its finished startup tasks with a nice message on the console.
type TLM ¶
type TLM struct {
// contains filtered or unexported fields
}
TLM is a Team Location Mapper that contains a static mapping.
func (*TLM) GetCurrentMapping ¶
GetCurrentMapping is a convenience function to retrieve the current mapping for the current match.
func (*TLM) GetCurrentTeams ¶
GetCurrentTeams returns the teams that are expected to be on the field at this time.
func (*TLM) GetFieldForTeam ¶
GetFieldForTeam returns the current location for a given team number.
func (*TLM) InsertOnDemandMap ¶
InsertOnDemandMap inserts an on-demand mapping that overrides any current schedule. WARNING: This is immediate.
func (*TLM) RecoverState ¶ added in v0.1.7
RecoverState loads the TLM data from a file.