k8s

package
v0.0.0-...-8571017 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterWatcher

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

ClusterWatcher watches services and endpoints inside of a cluster.

func ConnectInCluster

func ConnectInCluster() (*ClusterWatcher, error)

ConnectInCluster connects to the API server from a pod inside the cluster.

func ConnectOutOfCluster

func ConnectOutOfCluster(kubeconfig, master string) (*ClusterWatcher, error)

ConnectOutOfCluster connects to the API server from outside of the cluster.

func New

func New(config *rest.Config) (*ClusterWatcher, error)

New returns a ClusterWatcher from a kubernetes config.

func (*ClusterWatcher) ListEndpointSlices

func (cw *ClusterWatcher) ListEndpointSlices(s cache.Store) error

ListEndpointSlices sends all EndpointSlices to the provided cache.Store.

func (*ClusterWatcher) ListNodes

func (cw *ClusterWatcher) ListNodes(s cache.Store) error

ListNodes sends all nodes to the provided cache.Store.

func (*ClusterWatcher) ListServices

func (cw *ClusterWatcher) ListServices(s cache.Store) error

ListServices sends all services to the provided cache.Store.

func (*ClusterWatcher) WatchEndpointSlices

func (cw *ClusterWatcher) WatchEndpointSlices(ctx context.Context, s cache.Store) error

WatchEndpointSlices notifes the provided cache.Store of changes to EndpointSlices, in all namespaces.

func (*ClusterWatcher) WatchNodes

func (cw *ClusterWatcher) WatchNodes(ctx context.Context, s cache.Store) error

WatchNodes notifes the provided cache.Store of changes to nodes.

func (*ClusterWatcher) WatchServices

func (cw *ClusterWatcher) WatchServices(ctx context.Context, s cache.Store) error

WatchServices notifes the provided ServiceReceiver of changes to services, in all namespaces.

Jump to

Keyboard shortcuts

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