Documentation ¶
Index ¶
Constants ¶
View Source
const ( StateInit = "INIT" StateRun = "RUN" StatePit = "PIT" StateStop = "STOP" StateOut = "OUT" OUT_THRESHOLD = 60.0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CarProcessor ¶
type CarProcessor struct { Manifests *model.Manifests ByCarIdx map[int]*model.CarEntry ByCarNum map[string]*model.CarEntry ComputeState map[string]model.AnalysisCarComputeState StintLookup map[string]model.AnalysisCarStints PitLookup map[string]model.AnalysisCarPits CarInfoLookup map[string]model.AnalysisCarInfo NumByIdx map[int]string CurrentDrivers map[int]string CarClasses []model.CarClass // contains filtered or unexported fields }
func NewCarProcessor ¶
func NewCarProcessor(opts ...CarProcessorOption) *CarProcessor
func (*CarProcessor) ProcessAnalysisData ¶
func (p *CarProcessor) ProcessAnalysisData(analysisData *model.AnalysisData)
func (*CarProcessor) ProcessCarPayload ¶
func (p *CarProcessor) ProcessCarPayload(payload *model.CarPayload)
gets called when a car message is received via "...live.cardata" topic
func (*CarProcessor) ProcessStatePayload ¶
func (p *CarProcessor) ProcessStatePayload(payload *model.StatePayload)
gets called when a state message is received via "...live.state" topic
func (*CarProcessor) ProcessStatePayloads ¶
func (p *CarProcessor) ProcessStatePayloads(payloads []*model.StatePayload)
gets called when multiple state message are available and needs to be processed (mainly in tests)
type CarProcessorOption ¶
type CarProcessorOption func(cp *CarProcessor)
func WithByCarIdx ¶
func WithByCarIdx(byCarIdx map[int]*model.CarEntry) CarProcessorOption
func WithManifests ¶
func WithManifests(manifests *model.Manifests) CarProcessorOption
Click to show internal directories.
Click to hide internal directories.