Versions in this module Expand all Collapse all v0 v0.1.0 Sep 19, 2026 Changes in this version + const InterfaceVersion + const ManifestName + const MaxManifestBytes + var Default = NewRegistry() + var ErrNoManifest = errors.New("no " + ManifestName + ": not a client plugin") + func RegisterCompanion(c Companion) + func RegisterSource(s Source) + type Actor interface + Act func(ctx context.Context, action string, values map[string]string) error + type Companion interface + Name func() string + Notify func(ctx context.Context, e Event) error + Start func(ctx context.Context, h Host) error + Stop func() error + Wants func() []EventKind + type Corner struct + ApexKmh int + ApexPct int + BrakeAtApex int + BrakeAtPct int + ExitKmh int + GearAtApex int + MinKmh int + Pattern wire.CornerPattern + PeakBrakePct int + ThrottleLag int + Turn int + TurnInBrakePct int + func (c Corner) Wire() wire.Corner + type CornerApproaching struct + ApexPct int + At time.Time + Lap int + MetresToApex int + Stint Stint + Turn int + func (*CornerApproaching) Kind() EventKind + func (e *CornerApproaching) When() time.Time + type CornerPassed struct + At time.Time + Corner Corner + Lap int + Stint Stint + func (*CornerPassed) Kind() EventKind + func (e *CornerPassed) When() time.Time + type Event interface + Kind func() EventKind + When func() time.Time + type EventKind string + const KindCornerApproaching + const KindCornerPassed + const KindLapCompleted + const KindLapLastCorner + const KindSampled + const KindServerChanged + const KindStintFinished + const KindStintStarted + func Kinds() []EventKind + func (k EventKind) Known() bool + type Host interface + Audible func() bool + Do func(ctx context.Context, method, path string, body io.Reader, header http.Header) (*http.Response, error) + Driver func() (slug, name string) + Log func() *slog.Logger + Page func(html string) + Play func(ctx context.Context, audio []byte, contentType string) error + Say func(ctx context.Context, text string) error + Server func() string + SetSetting func(key, value string) error + Setting func(key string) string + Status func(text string) + type Kind string + const KindCompanion + const KindSource + type LapCompleted struct + At time.Time + Corners []Corner + Lap int + LapKind wire.Kind + LapMs int + SectorMs []int + StartedAt time.Time + Stint Stint + Trace []wire.TracePoint + func (*LapCompleted) Kind() EventKind + func (e *LapCompleted) When() time.Time + type LapLastCorner struct + At time.Time + Corners []Corner + ElapsedMs int + Lap int + Stint Stint + func (*LapLastCorner) Kind() EventKind + func (e *LapLastCorner) When() time.Time + type Manifest struct + Description string + InterfaceVersion int + Kind Kind + Name string + ServerPlugin string + Title string + func LoadManifest(dir string) (Manifest, error) + func LoadManifestFS(fsys fs.FS, dir string) (Manifest, error) + func (m Manifest) Validate() error + type Muted interface + Audible func() bool + type Player interface + Play func(ctx context.Context, audio []byte, contentType string) error + Say func(ctx context.Context, text string) error + type Registry struct + func NewRegistry() *Registry + func (r *Registry) AddCompanion(c Companion) + func (r *Registry) AddSource(s Source) + func (r *Registry) Companion(name string) (Companion, bool) + func (r *Registry) Companions() []Companion + func (r *Registry) Source(name string) (Source, bool) + func (r *Registry) Sources() []Source + type Sample struct + At time.Time + BestLapMs int + Brake float64 + Car string + CarClass string + Field []wire.FieldCar + Flag wire.Flag + FuelL float64 + FuelPerHourL float64 + Gear int + Incidents int + Lap int + LapDistPct float64 + LapsTotal int + LastLapMs int + Lat float64 + LatG float64 + Lon float64 + LongG float64 + OnPitRoad bool + OnTrack bool + Position int + RPM float64 + Sectors []float64 + Session wire.SessionType + SessionName string + SetupOpen bool + SpeedKmh float64 + SteerDeg float64 + Throttle float64 + Track string + TrackID string + TrackLengthM int + Tyres Tyres + Weather Weather + func (s Sample) LivePoint(offsetMs int) wire.LivePoint + func (s Sample) TracePoint(offsetMs int) wire.TracePoint + type Sampled struct + Lap int + OffsetMs int + Sample Sample + Stint Stint + func (*Sampled) Kind() EventKind + func (e *Sampled) When() time.Time + type ServerChanged struct + At time.Time + Me wire.Me + func (*ServerChanged) Kind() EventKind + func (e *ServerChanged) When() time.Time + type Source interface + Close func() error + Name func() string + Open func(ctx context.Context) error + Read func(ctx context.Context) (Sample, error) + Running func() bool + type Stint struct + Car string + CarClass string + ID string + Sectors []float64 + Session wire.SessionType + SetupOpen bool + Sim string + StartedAt time.Time + Track string + TrackID string + TrackLengthM int + type StintFinished struct + At time.Time + Laps int + Stint Stint + func (*StintFinished) Kind() EventKind + func (e *StintFinished) When() time.Time + type StintStarted struct + At time.Time + Stint Stint + func (*StintStarted) Kind() EventKind + func (e *StintStarted) When() time.Time + type Tyres struct + LF float64 + LR float64 + RF float64 + RR float64 + type Weather struct + AirTempC float64 + Humidity float64 + Skies int + TrackTempC float64 + Wetness int + WindKmh float64