discovery

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package discovery resolves the live pods of an AgentDeploy through the headless Service that the AgentDeploy reconciler maintains.

Index

Constants

View Source
const HeadlessSuffix = "-headless"

HeadlessSuffix matches v1alpha1.AgentDeploy.HeadlessServiceName().

Variables

This section is empty.

Functions

func Discover

func Discover(ctx context.Context, r Resolver, agentDeploy, namespace string) ([]string, error)

Discover returns the list of pod DNS names to scrape for the given AgentDeploy.

func HeadlessHost

func HeadlessHost(agentDeploy, namespace string) string

HeadlessHost returns the DNS name of the AgentDeploy's headless Service.

func PodHost

func PodHost(agentDeploy, namespace string, replica int) string

PodHost returns the DNS name of the i-th replica's pod.

Types

type Resolver

type Resolver interface {
	LookupHost(ctx context.Context, host string) ([]string, error)
}

Resolver is a small interface that net.DefaultResolver satisfies; tests inject a stub.

Jump to

Keyboard shortcuts

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