Documentation ¶
Index ¶
- Constants
- type Config
- type ConfigFunc
- func WithContext(ctx context.Context, cancelFunc context.CancelFunc) ConfigFunc
- func WithEnsureLiveData(b bool) ConfigFunc
- func WithEnsureLiveDataInterval(t time.Duration) ConfigFunc
- func WithGrpcConn(conn *grpc.ClientConn) ConfigFunc
- func WithGrpcLogFile(grpcLogFile string) ConfigFunc
- func WithMaxSpeed(f float64) ConfigFunc
- func WithRaceSessionRecorded(c chan int32) ConfigFunc
- func WithRecordingMode(mode providerv1.RecordingMode) ConfigFunc
- func WithSpeedmapPublishInterval(t time.Duration) ConfigFunc
- func WithSpeedmapSpeedThreshold(f float64) ConfigFunc
- func WithToken(token string) ConfigFunc
- func WithWaitForDataTimeout(t time.Duration) ConfigFunc
- func WithWaitForServicesTimeout(t time.Duration) ConfigFunc
- func WithWatchdogInterval(t time.Duration) ConfigFunc
- type EventKeyFunc
- type Racelogger
- func (r *Racelogger) Close()
- func (r *Racelogger) GetRaceSessions() (all []int, current int32, err error)
- func (r *Racelogger) GetSessionName(sessionNum int32) string
- func (r *Racelogger) RegisterProvider(eventName, eventDescription string) error
- func (r *Racelogger) RegisterProviderHeat(eventName, eventDescription, sessionName string) error
- func (r *Racelogger) StartRecording()
- func (r *Racelogger) UnregisterProvider()
- func (r *Racelogger) WaitForNextRaceSession(lastRaceSessionNum int32) int32
Constants ¶
View Source
const (
RACE = "Race"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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
Click to show internal directories.
Click to hide internal directories.