Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerConfig ¶
type DockerConfig struct { // ContainerID is the ID of the container to run ContainerID string `yaml:"containerID"` }
DockerConfig is a configuration block for Docker configuration.
type GCPConfig ¶
type GCPConfig struct { // InstanceID is the id of the GCP instance. InstanceID string `yaml:"instanceID"` // Project name is the project the instance is in. Project string `yaml:"project"` // Zone is the zone the instance is in. Zone string `yaml:"zone"` }
GCPConfig is a configuration block for GCP configuration.
type MinecraftServerConfig ¶
type MinecraftServerConfig struct { // Hostname of the remote server. This is used to connect to the // remote backend. It does NOT need to match the client's requested // hostname. Hostname string `yaml:"hostname"` // Port of the remote server, defaults to 25565. Port uint `yaml:"port"` }
MinecraftServerConfig is the configuration block for a Minecraft server.
type ProxyConfig ¶
type ProxyConfig struct { // ListenAddress is the address the proxy should listen on. ListenAddress string `yaml:"listenAddress"` // Servers contains a list of all servers to proxy Servers []ServerConfig `yaml:"servers"` }
ProxyConfig is a configuration file for the proxy.
func LoadProxyConfig ¶
func LoadProxyConfig(path string) (*ProxyConfig, error)
LoadProxyConfig loads a proxy configuration file.
type ServerConfig ¶
type ServerConfig struct { // Hostname is the hostname of the server. This should be the value // that clients connect to through the Minecraft launcher. Hostname string `yaml:"hostname"` // ShutdownAfter is the amount of time to wait before // shutting down the server after the last connection // is closed. // // Defaults to 15 minutes. ShutdownAfter time.Duration `yaml:"shutdownAfter"` // GCP is the GCP configuration block. GCP *GCPConfig `yaml:"gcp"` // Docker is the Docker configuration block. Docker *DockerConfig `yaml:"docker"` // Minecraft is the Minecraft configuration block. Minecraft MinecraftServerConfig `yaml:"minecraft"` // Whitelist is a list of usernames to whitelist. If empty, // all users are allowed. Whitelist []string `yaml:"whitelist"` }
ServerConfig is a configuration block for a server
Click to show internal directories.
Click to hide internal directories.