spectator

package
v0.0.0-...-2ce17fe Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2015 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferedRead

func BufferedRead(filepath string) ([]byte, error)

func EndOfGameStatsHandler

func EndOfGameStatsHandler(w http.ResponseWriter, r *http.Request)

func FeaturedHandler

func FeaturedHandler(w http.ResponseWriter, r *http.Request)

func GetGameDataChunkHandler

func GetGameDataChunkHandler(w http.ResponseWriter, r *http.Request)

func GetGameMetaDataHandler

func GetGameMetaDataHandler(w http.ResponseWriter, r *http.Request)

func GetKeyFrameHandler

func GetKeyFrameHandler(w http.ResponseWriter, r *http.Request)

func GetLastChunkInfoHandler

func GetLastChunkInfoHandler(w http.ResponseWriter, r *http.Request)

func UnBufferedRead

func UnBufferedRead(filepath string) []byte

func VersionHandler

func VersionHandler(w http.ResponseWriter, r *http.Request)

Types

type ChunkInfo

type ChunkInfo struct {
	ChunkId            int `json:"chunkId"`
	AvailableSince     int `json:"availableSince"`
	NextAvailableChunk int `json:"nextAvailableChunk"`
	KeyFrameId         int `json:"keyFrameId"`
	NextChunkId        int `json:"nextChunkId"`
	EndStartupChunkId  int `json:"endStartupChunkId"`
	StartGameChunkId   int `json:"startGameChunkId"`
	EndGameChunkId     int `json:"endGameChunkId"`
	Duration           int `json:"duration"`
}

type MetaData

type MetaData struct {
	GameKey struct {
		GameId     int    `json:"gameId"`
		PlatformId string `json:"platformId"`
	} `json:"gameKey"`
	GameServerAddress         string `json:"gameServerAddress"`
	Port                      int    `json:"port"`
	EncryptionKey             string `json:"encryptionKey"`
	ChunkTimeInterval         int    `json:"chunkTimeInterval"`
	StartTime                 string `json:"startTime"`
	GameEnded                 bool   `json:"gameEnded"`
	LastChunkId               int    `json:"lastChunkId"`
	LastKeyFrameId            int    `json:"lastKeyFrameId"`
	EndStartupChunkId         int    `json:"endStartupChunkId"`
	DelayTime                 int    `json:"delayTime"`
	PendingAvailableChunkInfo []struct {
		Duration     int    `json:"duration"`
		Id           int    `json:"id"`
		ReceivedTime string `json:"receivedTime"`
	} `json:"pendingAvailableChunkInfo"`
	PendingAvailableKeyFrameInfo []struct {
		Id           int    `json:"id"`
		ReceivedTime string `json:"receivedTime"`
		NextChunkId  int    `json:"nextChunkId"`
	} `json:"pendingAvailableKeyFrameInfo"`
	KeyFrameTimeInterval      int    `json:"keyFrameTimeInterval"`
	DecodedEncryptionKey      string `json:"decodedEncryptionKey"`
	StartGameChunkId          int    `json:"startGameChunkId"`
	GameLength                int    `json:"gameLength"`
	ClientAddedLag            int    `json:"clientAddedLag"`
	ClientBackFetchingEnabled bool   `json:"clientBackFetchingEnabled"`
	ClientBackFetchingFreq    int    `json:"clientBackFetchingFreq"`
	InterestScore             int    `json:"interestScore"`
	FeaturedGame              bool   `json:"featuredGame"`
	CreateTime                string `json:"createTime"`
	EndGameChunkId            int    `json:"endGameChunkId"`
	EndGameKeyFrameId         int    `json:"endGameKeyFrameId"`
	FirstChunkId              int    `json:"firstChunkId"`
}

Jump to

Keyboard shortcuts

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