utils

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEventNotFound = errors.New("event not found")

Functions

func ExtractFromDBUrl

func ExtractFromDBUrl(url string) string

func ExtractFromWebsocketUrl

func ExtractFromWebsocketUrl(url string) (addr, proto string)

func WaitForHttpResponse

func WaitForHttpResponse(url string, timeout time.Duration) error

func WaitForTCP

func WaitForTCP(addr string, timeout time.Duration) error

Types

type EventLookup added in v0.12.0

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

func NewEventLookup added in v0.12.0

func NewEventLookup() *EventLookup

func (*EventLookup) AddEvent added in v0.12.0

func (e *EventLookup) AddEvent(
	event *eventv1.Event,
	track *trackv1.Track,
	recordingMode providerev1.RecordingMode,
) *EventProcessingData

func (*EventLookup) Clear added in v0.12.0

func (e *EventLookup) Clear()

func (*EventLookup) GetEvent added in v0.12.0

func (e *EventLookup) GetEvent(selector *commonv1.EventSelector) (
	*EventProcessingData, error,
)

func (*EventLookup) GetEvents added in v0.12.0

func (e *EventLookup) GetEvents() []*EventProcessingData

func (*EventLookup) RemoveEvent added in v0.12.0

func (e *EventLookup) RemoveEvent(selector *commonv1.EventSelector)

type EventProcessingData added in v0.12.0

type EventProcessingData struct {
	Event               *eventv1.Event
	Track               *trackv1.Track
	Processor           *processing.Processor
	AnalysisBroadcast   broadcast.BroadcastServer[*analysisv1.Analysis]
	RacestateBroadcast  broadcast.BroadcastServer[*racestatev1.PublishStateRequest]
	DriverDataBroadcast broadcast.BroadcastServer[*racestatev1.PublishDriverDataRequest]
	SpeedmapBroadcast   broadcast.BroadcastServer[*racestatev1.PublishSpeedmapRequest]
	Mutex               sync.Mutex
	LastDriverData      *racestatev1.PublishDriverDataRequest
	LastAnalysisData    *analysisv1.Analysis
	RecordingMode       providerev1.RecordingMode
	LastRsInfoId        int // holds the last rs_info_id for storing state data
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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