Documentation ¶
Index ¶
- func Build(opts ...BuildOption) server.Server
- func BuildRandom() server.Server
- func Create(ctx context.Context, repo repositories.ServerRepository, opts ...BuildOption) server.Server
- func Save(ctx context.Context, repo repositories.ServerRepository, svr server.Server) server.Server
- type BuildOption
- func WithAddress(ip string, port int) BuildOption
- func WithDiscoveryStatus(status status.DiscoveryStatus) BuildOption
- func WithInfo(fields map[string]string) BuildOption
- func WithNoInfo() BuildOption
- func WithObjectives(objectives []map[string]string) BuildOption
- func WithPlayers(players []map[string]string) BuildOption
- func WithQueryPort(queryPort int) BuildOption
- func WithRandomAddress() BuildOption
- type BuildParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(opts ...BuildOption) server.Server
func BuildRandom ¶
func Create ¶
func Create( ctx context.Context, repo repositories.ServerRepository, opts ...BuildOption, ) server.Server
func Save ¶
func Save( ctx context.Context, repo repositories.ServerRepository, svr server.Server, ) server.Server
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
Click to show internal directories.
Click to hide internal directories.