Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCsvAdapterConfiguration = errors.New("[CSV] invalid adapter configuration") ErrInvalidFilePath = errors.New("[CSV] invalid file path") ErrInvalidRetention = errors.New("[CSV] invalid retention type") )
View Source
var ErrInvalidMySQLAdapterConfiguration = errors.New("[MySQL] invalid adapter configuration")
View Source
var ErrInvalidUDPAdapterConfiguration = errors.New("[UDP] invalid adapter configuration")
Functions ¶
func SetupAdapter ¶
func SetupAdapter(game enums.Game) []telemetry.ConverterInterface
SetupAdapter sets up game adapters like CSV export, MySQL export, etc.
Types ¶
type BestLapEntity ¶
type BestLapEntity struct {
ID int64 `db:"id"`
UserID int64 `db:"user_id"`
CarOrdinal int `db:"CarOrdinal"`
TrackOrdinal int `db:"TrackOrdinal"`
BestLap float32 `db:"BestLap"`
Fuel float32 `db:"Fuel"`
CarClass int `db:"CarClass"`
DrivetrainType int `db:"DrivetrainType"`
CarPerformanceIndex int `db:"CarPerformanceIndex"`
NumCylinders int `db:"NumCylinders"`
LapNumber int `db:"LapNumber"`
RacePosition int `db:"RacePosition"`
CreatedAt time.Time `db:"created_at"`
}
type ConverterData ¶
type ConverterInterface ¶
type CsvConverter ¶
type CsvConverter struct {
ConverterData
Fs afero.Fs
FilePath string
Retention enums.RetentionType
// contains filtered or unexported fields
}
func NewCsvConverter ¶
func (*CsvConverter) ChannelInit ¶
func (*CsvConverter) CorrectFilePath ¶
func (csv *CsvConverter) CorrectFilePath(now time.Time) (string, error)
CorrectFilePath returns the correct file path based on the retention type
type MySQLConverter ¶
type MySQLConverter struct {
ConverterData
User, Password, Host, Port, Database, TableName string
// contains filtered or unexported fields
}
func NewMySQLConverter ¶
func NewMySQLConverter(game enums.Game, adapterConfiguration []string) (*MySQLConverter, error)
func (*MySQLConverter) ChannelInit ¶
type MysqlBestLapConverter ¶
type MysqlBestLapConverter struct {
ConverterData
User, Password, Host, Port, Database, TableName string
// contains filtered or unexported fields
}
func NewMysqlBestLapConverter ¶
func NewMysqlBestLapConverter(game enums.Game, adapterConfiguration []string) (*MysqlBestLapConverter, error)
func (*MysqlBestLapConverter) ChannelInit ¶
type UdpForwarder ¶
type UdpForwarder struct {
ConverterData
Clients []*UdpClient
}
func NewUdpForwarder ¶
func NewUdpForwarder(game enums.Game, adapterConfiguration []string) (*UdpForwarder, error)
func (*UdpForwarder) ChannelInit ¶
Click to show internal directories.
Click to hide internal directories.