livesplit_race_manager

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 24 Imported by: 0

README

LiveSplit Race Multiplexer

TODO: README

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Generate protobuf code

Using buf.build to generate code:

go generate

The generated code should be part of your pull request.

License

MIT

Documentation

Index

Constants

View Source
const LiveSplitTimeWatchRefreshRate = 250 * time.Millisecond

Variables

This section is empty.

Functions

func NewAPI

func NewAPI(opts NewAPIOpts) error

func SetGinLogMode

func SetGinLogMode()

Types

type LiveSplit

type LiveSplit struct {
	ID                string                   `json:"id,omitempty"`
	State             LiveSplitConnectionState `json:"state,omitempty"`
	Run               *connectv1.Run           `json:"run,omitempty"`
	Segments          []*connectv1.Segment     `json:"segments,omitempty"`
	CurrentSegment    *connectv1.Segment       `json:"current_segment,omitempty"`
	CurrentTimerPhase connectv1.TimerPhase     `json:"current_timer_phase,omitempty"`
	Time              *connectv1.Time          `json:"time,omitempty"`
}

type LiveSplitConnectionState

type LiveSplitConnectionState string
const (
	LiveSplitStateDisconnected        LiveSplitConnectionState = "disconnected"
	LiveSplitStateWaitingForLiveSplit LiveSplitConnectionState = "waiting_for_livesplit"
	LiveSplitStateConnected           LiveSplitConnectionState = "connected"
)

type LiveSplitManager

type LiveSplitManager struct {
	Multiplexer multiplexerv1.DiscoveryServiceClient
	Connect     connectv1.LiveSplitServiceClient
	// contains filtered or unexported fields
}

func NewLiveSplitManager

func NewLiveSplitManager(opts LiveSplitManagerOpts) (*LiveSplitManager, error)

func (*LiveSplitManager) Close

func (lsm *LiveSplitManager) Close()

func (*LiveSplitManager) LiveSplits

func (lsm *LiveSplitManager) LiveSplits() []*LiveSplit

type LiveSplitManagerOpts

type LiveSplitManagerOpts struct {
	MultiplexerAddress string
}

type NewAPIOpts

type NewAPIOpts struct {
	LSM     *LiveSplitManager
	Address string
}

Directories

Path Synopsis
cmd
grpc
livesplit

Jump to

Keyboard shortcuts

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