util

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverData   providerType = "DriverData"
	StateData    providerType = "StateData"
	SpeedmapData providerType = "SpeedmapData"
)

Variables

View Source
var (
	Speed        = 1
	Addr         = "http://localhost:8084"
	LogLevel     = "info"
	Token        = ""
	EventKey     = ""
	DoNotPersist = false
	FastForward  = ""
)

Functions

func ParseLogLevel

func ParseLogLevel(l string, defaultVal log.Level) log.Level

Types

type ReplayDataProvider

type ReplayDataProvider interface {
	ProvideEventData(eventId int) *providerv1.RegisterEventRequest
	NextDriverData() *racestatev1.PublishDriverDataRequest
	NextStateData() *racestatev1.PublishStateRequest
	NextSpeedmapData() *racestatev1.PublishSpeedmapRequest
}

type ReplayOption added in v0.15.0

type ReplayOption func(*ReplayTask)

func CollectReplayOptions added in v0.15.0

func CollectReplayOptions() []ReplayOption

func WithFastForward added in v0.15.0

func WithFastForward(ff time.Duration) ReplayOption

type ReplayTask

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

func NewReplayTask

func NewReplayTask(dataProvider ReplayDataProvider, opts ...ReplayOption) *ReplayTask

func (*ReplayTask) Replay

func (r *ReplayTask) Replay(eventId int) error

Jump to

Keyboard shortcuts

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