service

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminService added in v0.8.0

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

func InitAdminService added in v0.8.0

func InitAdminService(pool *pgxpool.Pool) *AdminService

func (*AdminService) DeleteEvent added in v0.8.0

func (s *AdminService) DeleteEvent(id int) error

type CarService

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

func InitCarService

func InitCarService(pool *pgxpool.Pool) *CarService

func (*CarService) AddCar

func (s *CarService) AddCar(entry *model.DbCar) error

type Client

type Client struct {
	WampClient *client.Client
	CancelFunc context.CancelFunc
}

contains informations about the connected Provider Client

type MetricRecorder added in v0.10.0

type MetricRecorder struct {
	Recorder   metric.Float64Histogram
	MsgCounter int
}

type ProviderData

type ProviderData struct {
	Event            *model.DbEvent
	Analysis         *model.DbAnalysis
	Registered       time.Time
	Clients          []*Client // currently not used
	ActiveClient     *Client
	Processor        *processing.Processor
	StopChan         chan struct{} // used to stop background tasks
	StateRecorder    MetricRecorder
	SpeedmapRecorder MetricRecorder
	AnalysisRecorder MetricRecorder
}

type ProviderLookup

type ProviderLookup map[string]*ProviderData

type ProviderService

type ProviderService struct {
	Lookup ProviderLookup
	// contains filtered or unexported fields
}

func InitProviderService

func InitProviderService(pool *pgxpool.Pool) *ProviderService

func (*ProviderService) RegisterEvent

func (s *ProviderService) RegisterEvent(
	ctx context.Context,
	req *RegisterEventRequest) (
	*ProviderData, error,
)

func (*ProviderService) StoreEventExtra

func (s *ProviderService) StoreEventExtra(
	ctx context.Context,
	entry *model.DbEventExtra,
) error

func (*ProviderService) UpdateAnalysisData added in v0.9.0

func (s *ProviderService) UpdateAnalysisData(
	ctx context.Context,
	eventKey string,
) error

func (*ProviderService) UpdateReplayInfo added in v0.9.0

func (s *ProviderService) UpdateReplayInfo(ctx context.Context, eventKey string) error

type RegisterEventRequest

type RegisterEventRequest struct {
	EventKey  string              `json:"eventKey"`
	Manifests model.Manifests     `json:"manifests"`
	EventInfo model.EventDataInfo `json:"info"`
	TrackInfo model.TrackInfo     `json:"trackInfo"`
}

type SpeedmapService

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

func InitSpeedmapService

func InitSpeedmapService(pool *pgxpool.Pool) *SpeedmapService

func (*SpeedmapService) AddSpeedmap

func (s *SpeedmapService) AddSpeedmap(
	ctx context.Context,
	entry *model.DbSpeedmap,
) error

type StateService

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

func InitStateService

func InitStateService(pool *pgxpool.Pool) *StateService

func (*StateService) AddState

func (s *StateService) AddState(ctx context.Context, entry *model.DbState) error

Jump to

Keyboard shortcuts

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