car

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CarAttr

type CarAttr int8
const (
	CarAttrIdx CarAttr = iota
	CarAttrState
	CarAttrPos
	CarAttrPic
	CarAttrLap
	CarAttrLc
	CarAttrTrackPos
	CarAttrPitstops
	CarAttrStintLap
	CarAttrSpeed
	CarAttrDist
	CarAttrInterval
	CarAttrGap
	CarAttrTireCompound
	CarAttrLastLap
	CarAttrBestLap
	CarSessionTime
)

func ParseCarAttr

func ParseCarAttr(text string) (CarAttr, error)

func SupportedCarAttrs

func SupportedCarAttrs() []CarAttr

func (CarAttr) String

func (f CarAttr) String() string

func (*CarAttr) UnmarshalText

func (f *CarAttr) UnmarshalText(text []byte) error

type Option

type Option func(*OutputConfig)

func WithAllCarAttrs

func WithAllCarAttrs() Option

func WithCarAttrs

func WithCarAttrs(attrs []CarAttr) Option

func WithFormat

func WithFormat(f output.Format) Option

func WithWrier

func WithWrier(w io.Writer) Option

type Output

type Output interface {
	Header()
	Line(session *racestatev1.Session, car *racestatev1.Car)
	Flush()
}

func NewCarOutput

func NewCarOutput(opts ...Option) Output

type OutputConfig

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

Jump to

Keyboard shortcuts

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