runner

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type     ActionType      `json:"type"`
	Actor    int             `json:"actor"`
	Metadata RequestMeta     `json:"metadata"`
	Config   *GameConfig     `json:"config,omitempty"`
	Snapshot *SnapshotConfig `json:"snapshot,omitempty"`
	ConnReq  *ConnReqInfo    `json:"connectionRequestInfo,omitempty"`
}

type ActionType

type ActionType string
const (
	ActionStop        ActionType = "stop"
	ActionSnapshot    ActionType = "snapshot"
	ActionUndo        ActionType = "undo"
	ActionReconfigure ActionType = "reconfigure"
	ActionConnReq     ActionType = "connectionRequest"
)

type Config

type Config struct {
	AuthKey      string     `json:"authKey"`
	ControlPanel string     `json:"controlPanel"`
	GameConfig   GameConfig `json:"gameConfig"`
}

type ConnReqInfo

type ConnReqInfo struct {
	ConnectionID string `json:"connectionId"`
	Endpoint     string `json:"endpoint"`
	ServerCert   string `json:"serverCert"`
}

type Event

type Event struct {
	Type     EventType     `json:"type"`
	Metadata RequestMeta   `json:"metadata"`
	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 EventType

type EventType string
const (
	EventHello   EventType = "hello"
	EventStatus  EventType = "status"
	EventSysstat EventType = "sysstat"
	EventInfo    EventType = "info"
	EventStarted EventType = "started"
)

func (EventType) String added in v0.3.0

func (ev EventType) String() string

type GameConfig

type GameConfig struct {
	Server struct {
		PreferDetected     bool              `json:"preferDetected"`
		Version            string            `json:"name"`
		DownloadUrl        string            `json:"downloadUrl"`
		ManifestOverride   string            `json:"manifestOverride"`
		CustomCommand      []string          `json:"customCommand"`
		ServerPropOverride map[string]string `json:"serverPropOverride"`
		JavaVersion        int               `json:"javaVersion"`
		InactiveTimeout    int               `json:"inactiveTimeout"`
	} `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"`
}

type HelloExtra

type HelloExtra struct {
	Version string `json:"version"`
	Host    string `json:"host"`
	Addr    struct {
		IPv4 []string `json:"ipv4"`
		IPv6 []string `json:"ipv6,omitempty"`
	} `json:"addr"`
}

type InfoExtra

type InfoExtra struct {
	InfoCode entity.InfoCode `json:"infoCode"`
	Actor    int             `json:"actor"`
	IsError  bool            `json:"isError"`
}

type RequestMeta added in v0.3.0

type RequestMeta struct {
	Traceparent string `json:"traceparent"`
}

type SnapshotConfig

type SnapshotConfig struct {
	Slot int `json:"slot"`
}

type StartedExtra

type StartedExtra struct {
	ServerVersion string `json:"serverVersion"`
	World         struct {
		Name string `json:"name"`
		Seed string `json:"seed"`
	} `json:"world"`
}

type StatusExtra

type StatusExtra struct {
	EventCode entity.EventCode `json:"eventCode"`
	Progress  int              `json:"progress"`
}

type SysstatExtra

type SysstatExtra struct {
	CPUUsage float64 `json:"cpuUsage"`
	Time     int64   `json:"time"`
}

Jump to

Keyboard shortcuts

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