Documentation ¶
Index ¶
- type Cluster
- func (kc *Cluster) ActualNamespace(namespace string) string
- func (kc *Cluster) AddNamespaceListener(nsListener NamespaceListener)
- func (kc *Cluster) FindPodFromSelector(c context.Context, namespace string, selector map[string]string) (k8sapi.Object, error)
- func (kc *Cluster) GetClusterId(ctx context.Context) string
- func (kc *Cluster) GetCurrentNamespaces(forClientAccess bool) []string
- func (kc *Cluster) SetMappedNamespaces(c context.Context, namespaces []string) bool
- func (kc *Cluster) WaitForNSSync(c context.Context)
- func (kc *Cluster) WithK8sInterface(c context.Context) context.Context
- type Config
- type NamespaceListener
- type StateListener
- type Watcher
- func (w *Watcher) Active() bool
- func (w *Watcher) AddStateListener(l *StateListener)
- func (w *Watcher) Cancel()
- func (w *Watcher) EnsureStarted(c context.Context, cb func(bool))
- func (w *Watcher) Get(c context.Context, obj interface{}) (interface{}, bool, error)
- func (w *Watcher) HasSynced() bool
- func (w *Watcher) List(c context.Context) []interface{}
- func (w *Watcher) RemoveStateListener(rl *StateListener)
- func (w *Watcher) Watch(c context.Context, ready *sync.WaitGroup)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { *Config // contains filtered or unexported fields }
Cluster is a Kubernetes cluster reference
func NewCluster ¶
func (*Cluster) ActualNamespace ¶
func (*Cluster) AddNamespaceListener ¶
func (kc *Cluster) AddNamespaceListener(nsListener NamespaceListener)
func (*Cluster) FindPodFromSelector ¶
func (kc *Cluster) FindPodFromSelector(c context.Context, namespace string, selector map[string]string) (k8sapi.Object, error)
FindPodFromSelector returns a pod with the given name-hex-hex
func (*Cluster) GetCurrentNamespaces ¶
GetCurrentNamespaces returns the names of the namespaces that this client is mapping. If the forClientAccess is true, then the namespaces are restricted to those where an intercept can take place, i.e. the namespaces where this client can Watch and get services and deployments.
func (*Cluster) SetMappedNamespaces ¶
func (*Cluster) WaitForNSSync ¶
type Config ¶
type Config struct { Namespace string // default cluster namespace. Context string Server string ConfigFlags *genericclioptions.ConfigFlags // contains filtered or unexported fields }
func (*Config) ContextServiceAndFlagsEqual ¶
ContextServiceAndFlagsEqual determines if this instance is equal to the given instance with respect to context, server, and flag arguments.
func (*Config) GetManagerNamespace ¶
type NamespaceListener ¶
type StateListener ¶ added in v2.5.6
type StateListener struct {
Cb func()
}
type Watcher ¶
Watcher watches some resource and can be cancelled
func NewWatcher ¶
func (*Watcher) Active ¶ added in v2.5.6
Active returns true if the watcher has been started and not yet cancelled
func (*Watcher) AddStateListener ¶ added in v2.5.6
func (w *Watcher) AddStateListener(l *StateListener)
AddStateListener adds a listener function that will be called when the watcher changes its state (starts or is cancelled)
func (*Watcher) EnsureStarted ¶ added in v2.5.6
func (*Watcher) HasSynced ¶
HasSynced returns true if this Watcher's controller has synced, or if this watcher hasn't started yet
func (*Watcher) RemoveStateListener ¶ added in v2.5.6
func (w *Watcher) RemoveStateListener(rl *StateListener)
RemoveStateListener removes a listener function