Documentation ¶
Index ¶
- Variables
- func CopyFile(src, dst string) (err error)
- func Execute()
- func HumanUint32(num uint32) string
- type CrashEvent
- type GameLogEvent
- type InitialStatusEvent
- type LocalState
- type LogForwarder
- type MinepkgMapping
- type ProgressEvent
- type Root
- type StateResponse
- type StatsEvent
- type StatsState
- type TheThing
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StatusIdle = "idle" StatusStarting = "starting" StatusRunningLoading = "running:loading" StatusRunningReady = "running:ready" )
View Source
var ( // Version is the current version. it should be set by goreleaser Version string // commit is also set by goreleaser (in main.go) Commit string )
View Source
var (
MinecraftVersionFlag string
)
Functions ¶
func CopyFile ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherwise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func HumanUint32 ¶
HumanUint32 returns the number in a human readable format
Types ¶
type CrashEvent ¶ added in v0.1.8
type GameLogEvent ¶ added in v0.1.11
type InitialStatusEvent ¶ added in v0.1.10
type LocalState ¶ added in v0.1.10
type LocalState struct { Status string `json:"status"` Stats StatsState `json:"stats"` }
type LogForwarder ¶ added in v0.1.8
type LogForwarder struct { TheThing *TheThing // contains filtered or unexported fields }
type MinepkgMapping ¶
MinepkgMapping is a server mapping (very unfinished)
type ProgressEvent ¶ added in v0.1.8
type Root ¶ added in v0.1.5
type StateResponse ¶ added in v0.1.11
type StateResponse struct { Status string `json:"status,omitempty"` Stats StatsState `json:"stats,omitempty"` Manifest *manifest.Manifest `json:"manifest,omitempty"` Logs []*GameLogEvent `json:"logs,omitempty"` }
type StatsEvent ¶ added in v0.1.8
type StatsEvent struct { Memory *mem.VirtualMemoryStat `json:"memory"` ProcessMemoryPercent float32 `json:"processMemoryPercent"` ProcessMemoryMiB float32 `json:"processMemoryMiB"` ProcessCPUPercent float64 `json:"processCPUPercent"` }
type StatsState ¶ added in v0.1.10
type TheThing ¶ added in v0.1.10
type TheThing struct { *remote.Connection State *LocalState // contains filtered or unexported fields }
func (*TheThing) WriteLog ¶ added in v0.1.11
func (t *TheThing) WriteLog(log *GameLogEvent)
writes log stores the last 100 lines of logs in `logsBuffer`
Source Files ¶
Click to show internal directories.
Click to hide internal directories.