Help us shape the future of Go! Take the 2026 Go Developer Survey

k8s

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery added in v0.10.0

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

Discovery implements service discovery using Kubernetes Endpoints.

func NewK8sDiscovery

func NewK8sDiscovery(options Options) (*Discovery, error)

NewK8sDiscovery creates a new K8sDiscovery instance.

func (*Discovery) Close added in v0.10.0

func (k *Discovery) Close() error

Close cleans up resources used by the Kubernetes discovery provider.

func (*Discovery) GetInstances added in v0.10.0

func (k *Discovery) GetInstances(
	ctx context.Context,
	options provider.GetInstanceOptions,
) ([]provider.DiscoveryResult, error)

GetInstances returns the current list of service instances from Kubernetes endpoints.

func (*Discovery) Watch added in v0.10.0

func (k *Discovery) Watch(
	ctx context.Context,
	options provider.GetInstanceOptions,
) (<-chan []provider.DiscoveryResult, error)

Watch returns a channel that signals changes in Kubernetes endpoints.

type Options

type Options struct {
	// APIServer is the Kubernetes API server URL (e.g., "https://kubernetes.default.svc")
	APIServer string
	// KubeConfig is the path to kubeconfig file
	KubeConfig string
	// BearerToken is the authentication token
	BearerToken string
	// Insecure allows insecure server connections when using HTTPS
	Insecure bool
}

Options defines the configuration for the Kubernetes discovery provider.

Jump to

Keyboard shortcuts

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