server

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ctx context.Context, cfg Config) error

ListenAndServe starts a UDP discovery server and blocks until the context is canceled.

Types

type Config

type Config struct {
	Service       string
	DiscoveryPort int
	ServicePort   int
	ServiceHost   string
	Meta          map[string]string
	Logger        *log.Logger
	BufferSize    int
}

Config controls how the discovery server listens and what it advertises.

Jump to

Keyboard shortcuts

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