spectrum

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 4 Imported by: 0

README

Spectrum

Spectrum is a simple, lightweight, and easy to use Minecraft: Bedrock Edition proxy server.

Discord

Examples

You can find examples of how to use Spectrum in the example directory.

Implementations

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	// Addr is the address to listen on.
	Addr string `yaml:"addr"`
	// Token is the authentication token that Spectrum uses to authenticate with servers.
	// When making requests to servers, Spectrum sends this token to the server for validation.
	Token string `yaml:"token"`
	// LatencyInterval is the interval at which the latency of the connection is updated in milliseconds.
	// The lower the interval, the more accurate the latency will be, but the more bandwidth it will use.
	LatencyInterval int64 `yaml:"latency_interval"`
}

func DefaultOpts

func DefaultOpts() *Opts

type Spectrum

type Spectrum struct {
	// contains filtered or unexported fields
}

func NewSpectrum

func NewSpectrum(discovery server.Discovery, logger internal.Logger, opts *Opts) *Spectrum

func (*Spectrum) Accept

func (s *Spectrum) Accept() (*session.Session, error)

func (*Spectrum) Close

func (s *Spectrum) Close() error

func (*Spectrum) Listen

func (s *Spectrum) Listen(config minecraft.ListenConfig) (err error)

func (*Spectrum) Registry

func (s *Spectrum) Registry() *session.Registry

type StatusProvider

type StatusProvider struct {
	// contains filtered or unexported fields
}

func NewStatusProvider

func NewStatusProvider(message string) *StatusProvider

func (*StatusProvider) ServerStatus

func (s *StatusProvider) ServerStatus(playerCount int, maxPlayers int) minecraft.ServerStatus

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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