server

package
v0.0.0-...-434faa1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandInvalid    = CommandStatus("command is invalid")
	CommandSuccessful = CommandStatus("command was processed successfully")
	CommandFailed     = CommandStatus("command was processed with errors")
)

Variables

This section is empty.

Functions

func Run

func Run(address string) error

Types

type CommandStatus

type CommandStatus string

type Game

type Game interface {
	TogglePause(_ context.Context) error
	Play(_ context.Context) error
	Get(_ context.Context) (*GameState, error)
}

Game component.

type GameState

type GameState struct {
	Game *platform.Game
}

func (*GameState) MarshalBinary

func (s *GameState) MarshalBinary() (data []byte, err error)

func (*GameState) UnmarshalBinary

func (s *GameState) UnmarshalBinary(data []byte) error

type Router

type Router interface {
	Send(context.Context, command.Command) (CommandStatus, error)
}

Router component.

Jump to

Keyboard shortcuts

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