config

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Config: jconfig.DefaultConfig,
	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 {
	// Config is the Java edition configuration.
	// It is an alias for Editions.Java.Config.
	Config jconfig.Config `json:"config,omitempty" yaml:"config,omitempty"`
	// See Editions struct.
	Editions Editions `json:"editions,omitempty" yaml:"editions,omitempty"`
	// See HealthService struct.
	HealthService HealthService `json:"healthService,omitempty" yaml:"healthService,omitempty"`
	// See Connect struct.
	Connect connect.Config `json:"connect,omitempty" yaml:"connect,omitempty"`
}

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    `json:"java,omitempty" yaml:"java,omitempty"`
	Bedrock Bedrock `json:"bedrock,omitempty" yaml:"bedrock,omitempty"`
}

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           `json:"enabled,omitempty" yaml:"enabled,omitempty"`
	Config  jconfig.Config `json:"config,omitempty" yaml:"config,omitempty"`
}

Java edition.

Jump to

Keyboard shortcuts

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