racelogger

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RACE = "Race"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type ConfigFunc

type ConfigFunc func(cfg *Config)

func WithContext

func WithContext(ctx context.Context, cancelFunc context.CancelFunc) ConfigFunc

func WithEnsureLiveData

func WithEnsureLiveData(b bool) ConfigFunc

func WithEnsureLiveDataInterval

func WithEnsureLiveDataInterval(t time.Duration) ConfigFunc

func WithGrpcConn

func WithGrpcConn(conn *grpc.ClientConn) ConfigFunc

func WithGrpcLogFile

func WithGrpcLogFile(grpcLogFile string) ConfigFunc

func WithMaxSpeed

func WithMaxSpeed(f float64) ConfigFunc

func WithRaceSessionRecorded

func WithRaceSessionRecorded(c chan int32) ConfigFunc

func WithRecordingMode

func WithRecordingMode(mode providerv1.RecordingMode) ConfigFunc

func WithSpeedmapPublishInterval

func WithSpeedmapPublishInterval(t time.Duration) ConfigFunc

func WithSpeedmapSpeedThreshold

func WithSpeedmapSpeedThreshold(f float64) ConfigFunc

func WithToken

func WithToken(token string) ConfigFunc

func WithWaitForDataTimeout

func WithWaitForDataTimeout(t time.Duration) ConfigFunc

func WithWaitForServicesTimeout

func WithWaitForServicesTimeout(t time.Duration) ConfigFunc

func WithWatchdogInterval

func WithWatchdogInterval(t time.Duration) ConfigFunc

type EventKeyFunc

type EventKeyFunc func(api *irsdk.Irsdk) string

type Racelogger

type Racelogger struct {
	// contains filtered or unexported fields
}

Racelogger is the main component to control the connection to iRacing Telemetry API

func NewRaceLogger

func NewRaceLogger(cfg ...ConfigFunc) *Racelogger

func (*Racelogger) Close

func (r *Racelogger) Close()

func (*Racelogger) GetRaceSessions

func (r *Racelogger) GetRaceSessions() (all []int, current int32, err error)

func (*Racelogger) GetSessionName

func (r *Racelogger) GetSessionName(sessionNum int32) string

func (*Racelogger) RegisterProvider

func (r *Racelogger) RegisterProvider(eventName, eventDescription string) error

func (*Racelogger) RegisterProviderHeat

func (r *Racelogger) RegisterProviderHeat(
	eventName, eventDescription, sessionName string,
) error

func (*Racelogger) StartRecording

func (r *Racelogger) StartRecording()

this will start the recording in a goroutine. call returns immediately

func (*Racelogger) UnregisterProvider

func (r *Racelogger) UnregisterProvider()

func (*Racelogger) WaitForNextRaceSession

func (r *Racelogger) WaitForNextRaceSession(lastRaceSessionNum int32) int32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL