serverfactory

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(opts ...BuildOption) server.Server

func BuildRandom

func BuildRandom() server.Server

func Create

Types

type BuildOption

type BuildOption func(*BuildParams)

func WithAddress

func WithAddress(ip string, port int) BuildOption

func WithDiscoveryStatus

func WithDiscoveryStatus(status status.DiscoveryStatus) BuildOption

func WithInfo

func WithInfo(fields map[string]string) BuildOption

func WithNoInfo

func WithNoInfo() BuildOption

func WithObjectives

func WithObjectives(objectives []map[string]string) BuildOption

func WithPlayers

func WithPlayers(players []map[string]string) BuildOption

func WithQueryPort

func WithQueryPort(queryPort int) BuildOption

func WithRandomAddress

func WithRandomAddress() BuildOption

type BuildParams

type BuildParams struct {
	IP              string
	Port            int
	QueryPort       int
	DiscoveryStatus status.DiscoveryStatus
	Info            map[string]string
	Players         []map[string]string
	Objectives      []map[string]string
}

Jump to

Keyboard shortcuts

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