Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventHello EventType = "hello" EventStatus = "status" EventSysstat = "sysstat" EventInfo = "info" EventStarted = "started" )
View Source
const ( EventShutdown entity.EventCode = iota + 1 // 1 EventSysInit // 2 EventGameDownload // 3 EventWorldDownload // 4 EventWorldPrepare // 5 EventWorldUpload // 6 EventLoading // 7 EventRunning // 8 EventStopping // 9 EventCrashed // 10 EventClean // 11 )
View Source
const ( EventGameErr entity.EventCode = iota + 50 // 50 EventWorldErr // 51 EventLaunchErr // 52 )
Event codes that should be provided UI to retry.
View Source
const ( InfoSnapshotDone entity.InfoCode = iota + 1 // 1 InfoSnapshotError // 2 InfoNoSnapshot // 3 )
View Source
const ( ActionStop ActionType = "stop" ActionSnapshot = "snapshot" ActionUndo = "undo" ActionReconfigure = "reconfigure" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Type ActionType `json:"type"` Config *Config `json:"config,omitempty"` }
type ActionType ¶
type ActionType string
type Config ¶
type Config struct { AllocSize int `json:"allocSize"` AuthKey string `json:"authKey"` Server struct { Version string `json:"name"` DownloadUrl string `json:"downloadUrl"` } `json:"server"` World struct { ShouldGenerate bool `json:"shouldGenerate"` Name string `json:"name"` GenerationId string `json:"generationId"` Seed string `json:"seed"` LevelType string `json:"levelType"` Difficulty string `json:"difficulty"` } `json:"world"` Motd string `json:"motd"` Operators []string `json:"operators"` Whitelist []string `json:"whitelist"` AWS struct { AccessKey string SecretKey string } `json:"aws"` S3 struct { Endpoint string `json:"endpoint"` Bucket string `json:"bucket"` } `json:"s3"` ControlPanel string `json:"controlPanel"` }
type Event ¶
type Event struct { Type EventType `json:"type"` Hello *HelloExtra `json:"hello,omitempty"` Status *StatusExtra `json:"status,omitempty"` Sysstat *SysstatExtra `json:"sysstat,omitempty"` Info *InfoExtra `json:"info,omitempty"` Started *StartedExtra `json:"started,omitempty"` }
type HelloExtra ¶
type StartedExtra ¶
type StatusExtra ¶
type SysstatExtra ¶
Click to show internal directories.
Click to hide internal directories.