Documentation ¶
Index ¶
- func SetResourceWatcherCli(fs *pflag.FlagSet)
- type ResourceWatcher
- func (r *ResourceWatcher) DumpAPIResources() error
- func (r *ResourceWatcher) FetchNamespaces(ctx context.Context) error
- func (r *ResourceWatcher) GetWatchConfigs() ([]WatchConfig, error)
- func (r *ResourceWatcher) Start(parentCtx context.Context, cfg WatchConfig) *store.Store
- func (r *ResourceWatcher) Stop()
- type ResourceWatcherCli
- type WatchConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetResourceWatcherCli ¶
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
Click to show internal directories.
Click to hide internal directories.