resourcewatcher

package
v3.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetResourceWatcherCli

func SetResourceWatcherCli(fs *pflag.FlagSet)

Types

type ResourceWatcher

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

ResourceWatcher contains rest clients for a given kubernetes context

func NewResourceWatcher

func NewResourceWatcher(cluster string, resourceWatcherCli ResourceWatcherCli, storeConfig *store.StoreConfig) (*ResourceWatcher, error)

NewResourceWatcher creates a new resource watcher on a given cluster

func (*ResourceWatcher) DumpAPIResources

func (r *ResourceWatcher) DumpAPIResources() error

DumpAPIResources dumps api resources file

func (*ResourceWatcher) FetchNamespaces

func (r *ResourceWatcher) FetchNamespaces(ctx context.Context) error

FetchNamespaces gets the list of namespace from the cluster and fill the resource watcher with an initial list of namespaces This is only useful when we need to filter namespaces

func (*ResourceWatcher) GetWatchConfigs

func (r *ResourceWatcher) GetWatchConfigs() ([]WatchConfig, error)

GetWatchConfigs creates the list of k8s to watch

func (*ResourceWatcher) Start

func (r *ResourceWatcher) Start(parentCtx context.Context, cfg WatchConfig) *store.Store

Start begins the watch/poll of a given k8s resource

func (*ResourceWatcher) Stop

func (r *ResourceWatcher) Stop()

Stop closes the watch/poll process of a k8s resource

type ResourceWatcherCli

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

func GetResourceWatcherCli

func GetResourceWatcherCli() ResourceWatcherCli

type WatchConfig

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

WatchConfig provides the configuration to watch a specific kubernetes resource

Jump to

Keyboard shortcuts

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