discovery

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 22 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package discovery runs standalone orchestrator discovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Root

func Root(out, errOut io.Writer) *cobra.Command

func Serve

func Serve(parent context.Context, p Params, logOut io.Writer) (result error)

Types

type Params

type Params struct {
	ConfigFile string `` /* 158-byte string literal not displayed */
	nodeconfig.Settings
	Listen             netip.AddrPort       `default:"127.0.0.1:8939" descr:"Public HTTP listener"`
	MetricsListen      netip.AddrPort       `default:"127.0.0.1:8940" descr:"Loopback metrics listener"`
	Nodes              []boa.Text[*url.URL] `optional:"true" descr:"Orchestrator or discovery node base URLs"`
	AdvertiseNodes     bool                 `default:"true" descr:"Advertise available discovery nodes"`
	AdvertiseRunners   bool                 `default:"true" descr:"Advertise collected runners"`
	RefreshInterval    time.Duration        `default:"5m" descr:"Discovery inventory refresh interval"`
	MaxFailedRefreshes int                  `default:"6" min:"0" descr:"Consecutive failed refreshes before eviction"`
	Grants             []string             `optional:"true" descr:"Private discovery IP[:port] or CIDR grants"`
	PrintConfig        bool                 `optional:"true" boa:"noconfig,noenv" descr:"Print TOML configuration"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(p Params, logger *slog.Logger) (*Server, error)

NewServer configures an inventory collector without runner or payment dependencies.

func (*Server) Close

func (s *Server) Close()

func (*Server) Run

func (d *Server) Run(ctx context.Context)

Run refreshes immediately and periodically until ctx ends. Run it once and wait for it to return before closing the server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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