util

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 1 Imported by: 0

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 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

Jump to

Keyboard shortcuts

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