client

package
v2.13.12 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscoverer

func NewDiscoverer(config DiscovererConfig) (client.Discoverer, error)

func NewDiscoveryCacher

func NewDiscoveryCacher(discoverer client.Discoverer, config client.DiscoveryCacherConfig) client.Discoverer

NewDiscoveryCacher creates a new DiscoveryCacher that wraps a discoverer and caches the data into the specified storage

func NewDistributedDiscoveryCacher

func NewDistributedDiscoveryCacher(innerDiscoverer client.MultiDiscoverer, config client.DiscoveryCacherConfig) client.MultiDiscoverer

NewDistributedDiscoveryCacher initializes a client.MultiDiscoveryCacher with the given parameters. This should be the only way to create instances of client.MultiDiscoveryCacher, as it guarantees the cached data pointer is initialized.

func NewDistributedPodLabelDiscoverer

func NewDistributedPodLabelDiscoverer(config DistributedPodLabelDiscovererConfig) (client.MultiDiscoverer, error)

NewDistributedPodLabelDiscoverer creates a new KSM discoverer that will find KSM pods using k8s labels.

func NewPodLabelDiscoverer

func NewPodLabelDiscoverer(config PodLabelDiscovererConfig) (client.Discoverer, error)

NewPodLabelDiscoverer creates a new KSM discoverer that will find KSM pods using k8s labels.

Types

type DiscovererConfig added in v2.7.0

type DiscovererConfig struct {
	LookupSRV         LookupSRVFunc
	K8sClient         client.Kubernetes
	Logger            *logrus.Logger
	OverridenEndpoint string
	Namespace         string
}

DiscovererConfig holds parameters for creating discoverer.

type DistributedPodLabelDiscovererConfig added in v2.7.0

type DistributedPodLabelDiscovererConfig struct {
	KSMPodLabel  string
	NodeIP       string
	KSMNamespace string
	K8sClient    client.Kubernetes
	Logger       *logrus.Logger
}

DistributedPodLabelDiscovererConfig stores configuration for DistributedPodLabelDiscoverer.

type LookupSRVFunc added in v2.7.0

type LookupSRVFunc func(service, proto, name string) (cname string, addrs []*net.SRV, err error)

type PodLabelDiscovererConfig added in v2.7.0

type PodLabelDiscovererConfig struct {
	KSMPodLabel  string
	KSMPodPort   int
	KSMScheme    string
	KSMNamespace string
	Logger       *logrus.Logger
	K8sClient    client.Kubernetes
}

PodLabelDiscovererConfig holds KSM PodLabelDiscoverer configuration.

Jump to

Keyboard shortcuts

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