client

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Service       string
	DiscoveryPort int
	Timeout       time.Duration
	Targets       []*net.UDPAddr
	Logger        *log.Logger
	BufferSize    int
}

Config controls how discovery queries are sent and how long responses are collected.

type Result

type Result struct {
	Service string
	Addr    string
	Meta    map[string]string
	From    *net.UDPAddr
}

Result describes a single discovery response from a server instance.

func Discover

func Discover(ctx context.Context, cfg Config) ([]Result, error)

Discover sends a discovery query and collects matching responses until timeout or context cancelation.

Jump to

Keyboard shortcuts

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