source

package
v0.0.0-...-b2f9c62 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRefreshInterval = 5 * time.Minute

DefaultRefreshInterval is used for any source that did not configure `refresh_interval`. Picked to balance "feels live" with not hammering upstream APIs.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

type Closer interface {
	Close() error
}

Closer is an optional source capability for implementations that hold resources beyond a single Load call.

type Entry

type Entry struct {
	Source          Source
	RefreshInterval time.Duration
}

Entry pairs a Source with its refresh interval. The registry uses this to run periodic re-discovery in the background.

RefreshInterval == 0 means "do not refresh after the initial load".

func BuildSources

func BuildSources(cfg config.Config, client *http.Client) ([]Entry, error)

type LogAttributer

type LogAttributer interface {
	LogAttributes() []slog.Attr
}

LogAttributer is an optional source capability for adding safe, source-specific context to lifecycle logs.

type Source

type Source interface {
	Name() string
	Type() string
	Load(ctx context.Context) ([]compass.Service, error)
}

Directories

Path Synopsis
Package api implements the generic JSON-over-HTTP source.
Package api implements the generic JSON-over-HTTP source.
Package dnssd implements Prometheus-style DNS service discovery for SRV records.
Package dnssd implements Prometheus-style DNS service discovery for SRV records.
Package netbird reads peers from a NetBird management server's REST API (NetBird Cloud or self-hosted) and emits a compass.Service for each peer that has an IP or DNS label.
Package netbird reads peers from a NetBird management server's REST API (NetBird Cloud or self-hosted) and emits a compass.Service for each peer that has an IP or DNS label.
Package static implements the trivial source whose services are listed directly in compass.yaml.
Package static implements the trivial source whose services are listed directly in compass.yaml.

Jump to

Keyboard shortcuts

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