config

package
v0.21.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Editions: Editions{
		Java: Java{
			Enabled: true,
			Config:  jconfig.DefaultConfig,
		},
		Bedrock: Bedrock{
			Enabled: false,
			Config:  bconfig.DefaultConfig,
		},
	},
	HealthService: HealthService{
		Enabled: false,
		Bind:    "0.0.0.0:9090",
	},
	Connect: connect.DefaultConfig,
}

DefaultConfig is a default Config.

Functions

This section is empty.

Types

type Bedrock

type Bedrock struct {
	Enabled bool
	Config  bconfig.Config
}

Bedrock edition.

type Config

type Config struct {
	// See Editions struct.
	Editions Editions
	// See HealthService struct.
	HealthService HealthService
	// See Connect struct.
	Connect connect.Config
}

Config is the root configuration of Gate.

func (*Config) Validate

func (c *Config) Validate() (warns []error, errs []error)

Validate validates a Config and all enabled edition configs (Java / Bedrock).

type Editions

type Editions struct {
	Java    Java
	Bedrock Bedrock
}

Editions provides Minecraft edition specific configs. If multiple editions are enabled, cross-play is activated. If no edition is enabled, all will be enabled.

type HealthService

type HealthService struct {
	Enabled bool
	Bind    string
}

HealthService is a GRPC health probe service for use with Kubernetes pods. (https://github.com/grpc-ecosystem/grpc-health-probe)

type Java

type Java struct {
	Enabled bool
	Config  jconfig.Config
}

Java edition.

Jump to

Keyboard shortcuts

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