Documentation ¶
Index ¶
Constants ¶
View Source
const ( DriverData providerType = "DriverData" StateData providerType = "StateData" SpeedmapData providerType = "SpeedmapData" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Speed int SourceAddr string // grpc server address providing the data SourceInsecure bool // connect to gRPC server without TLS Token string EventKey string DoNotPersist bool FastForward string }
func DefaultConfig ¶
func DefaultConfig() *Config
type ProvideEventRequest ¶
type ProvideEventRequest func() *providerv1.RegisterEventRequest
type ReplayDataProvider ¶
type ReplayDataProvider interface { ProvideEventData(eventId uint32) *providerv1.RegisterEventRequest NextDriverData() *racestatev1.PublishDriverDataRequest NextStateData() *racestatev1.PublishStateRequest NextSpeedmapData() *racestatev1.PublishSpeedmapRequest }
func NewDataProvider ¶
func NewDataProvider( source *grpc.ClientConn, eventId uint32, eventRequestProvider ProvideEventRequest, ) ReplayDataProvider
type ReplayOption ¶
type ReplayOption func(*ReplayTask)
func WithContext ¶
func WithContext(ctx context.Context) ReplayOption
func WithFastForward ¶
func WithFastForward(ff time.Duration) ReplayOption
func WithLogging ¶
func WithLogging(logger *log.Logger) ReplayOption
func WithSpeed ¶
func WithSpeed(speed int) ReplayOption
func WithTokenProvider ¶
func WithTokenProvider(provider func() string) ReplayOption
type ReplayTask ¶
type ReplayTask struct {
// contains filtered or unexported fields
}
func NewReplayTask ¶
func NewReplayTask( dest *grpc.ClientConn, dataProvider ReplayDataProvider, opts ...ReplayOption, ) *ReplayTask
func (*ReplayTask) Replay ¶
func (r *ReplayTask) Replay(eventId uint32) error
Click to show internal directories.
Click to hide internal directories.