predict

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoData       = errors.New("no data found")
	ErrNeedMoreData = errors.New("not enough data to create PredictParam")
)

Functions

func GetLivePredictParam

func GetLivePredictParam(
	epd *utils.EventProcessingData,
	carNum string,
	laptimeSel predictv1.LaptimeSelector,
) (*predictv1.PredictParam, error)

func GetPredictParam

func GetPredictParam(
	ctx context.Context,
	pool *pgxpool.Pool,
	eventId int,
	sessionTime time.Duration,
	carNum string,
	laptimeSel predictv1.LaptimeSelector,
) (*predictv1.PredictParam, error)

func NewServer

func NewServer(opts ...Option) *predictServer

Types

type Option

type Option func(*predictServer)

func WithEventLookup

func WithEventLookup(lookup *utils.EventLookup) Option

func WithPool

func WithPool(p *pgxpool.Pool) Option

Jump to

Keyboard shortcuts

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