server

package
v0.0.0-...-1563aef Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	Time           float32
	Scores         map[string]float32
	Objects        []Object
	DeletedObjects []uint32
}

type Game

type Game struct {
	ID     string    `json:"id"`
	Date   time.Time `json:"date"`
	Active bool      `json:"active"`
}

type Handler

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

func (*Handler) Close

func (h *Handler) Close()

func (*Handler) Open

func (h *Handler) Open() error

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Meta

type Meta struct {
	FPS float32
}

type Object

type Object struct {
	ID       uint32
	Position gdvariant.Vector3
	Radius   float32
	Model    string
}

type ReadSeekCloser

type ReadSeekCloser interface {
	io.Reader
	io.Seeker
	io.Closer
}

type Replay

type Replay struct {
	GameID string    `json:"game_id"`
	Date   time.Time `json:"date"`
	// contains filtered or unexported fields
}

func (Replay) Seeker

func (r Replay) Seeker() (ReadSeekCloser, error)

func (Replay) WriteCloser

func (r Replay) WriteCloser() (io.WriteCloser, error)

type Server

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

func New

func New(c ServerConf) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) Serve

func (s *Server) Serve() error

type ServerConf

type ServerConf struct {
	Addr    string
	DataDir string
}

type Stream

type Stream struct {
	Length      int64
	FrameCount  int
	StopFrame   int
	TotalFrames int
	FPS         float64
	// contains filtered or unexported fields
}

func (*Stream) Close

func (s *Stream) Close()

func (*Stream) Read

func (s *Stream) Read(buf []byte) (int, error)

Jump to

Keyboard shortcuts

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