Documentation ¶
Index ¶
- func Objects[T Object](list []*EnvironmentWrapper[T]) []T
- type Discovery
- type EnvironmentWrapper
- type ErrorNotFound
- type Filter
- type ImpersonatedClientOption
- type Manager
- type Object
- type Option
- type WatchOption
- type Watcher
- func (w *Watcher[T]) All() []*EnvironmentWrapper[T]
- func (w *Watcher[T]) Delete(ctx context.Context, cluster, namespace string, name string) error
- func (w *Watcher[T]) Enabled() bool
- func (w *Watcher[T]) Get(cluster, namespace, name string) (T, error)
- func (w *Watcher[T]) GetByCluster(cluster string, filter ...Filter) []*EnvironmentWrapper[T]
- func (w *Watcher[T]) GetByNamespace(namespace string, filter ...Filter) []*EnvironmentWrapper[T]
- func (w *Watcher[T]) ImpersonatedClient(ctx context.Context, cluster string, opts ...ImpersonatedClientOption) (dynamic.NamespaceableResourceInterface, error)
- func (w *Watcher[T]) Start(ctx context.Context)
- func (w *Watcher[T]) SystemAuthenticatedClient(ctx context.Context, cluster string) (dynamic.NamespaceableResourceInterface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Objects ¶
func Objects[T Object](list []*EnvironmentWrapper[T]) []T
Types ¶
type Discovery ¶
type Discovery interface {
ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
}
type EnvironmentWrapper ¶
func (EnvironmentWrapper[T]) GetName ¶
func (e EnvironmentWrapper[T]) GetName() string
func (EnvironmentWrapper[T]) GetNamespace ¶
func (e EnvironmentWrapper[T]) GetNamespace() string
type ErrorNotFound ¶
func (*ErrorNotFound) As ¶
func (e *ErrorNotFound) As(v any) bool
func (*ErrorNotFound) Error ¶
func (e *ErrorNotFound) Error() string
func (*ErrorNotFound) GraphError ¶
func (e *ErrorNotFound) GraphError() string
func (*ErrorNotFound) Is ¶
func (e *ErrorNotFound) Is(v error) bool
type ImpersonatedClientOption ¶
type ImpersonatedClientOption func(s *impersonatedSettings)
func WithImpersonatedClientGVR ¶
func WithImpersonatedClientGVR(gvr schema.GroupVersionResource) ImpersonatedClientOption
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(scheme *runtime.Scheme, clusterConfig kubernetes.ClusterConfigMap, log logrus.FieldLogger, opts ...Option) (*Manager, error)
func (*Manager) GetDynamicClients ¶
type WatchOption ¶
type WatchOption func(*watcherSettings)
func WithConverter ¶
func WithConverter(fn func(o *unstructured.Unstructured, environmentName string) (obj any, ok bool)) WatchOption
func WithGVR ¶
func WithGVR(gvr schema.GroupVersionResource) WatchOption
func WithInformerFilter ¶
func WithInformerFilter(labelSelector string) WatchOption
func WithTransformer ¶
func WithTransformer(fn cache.TransformFunc) WatchOption
type Watcher ¶
type Watcher[T Object] struct { // contains filtered or unexported fields }
func (*Watcher[T]) All ¶
func (w *Watcher[T]) All() []*EnvironmentWrapper[T]
func (*Watcher[T]) GetByCluster ¶
func (w *Watcher[T]) GetByCluster(cluster string, filter ...Filter) []*EnvironmentWrapper[T]
func (*Watcher[T]) GetByNamespace ¶
func (w *Watcher[T]) GetByNamespace(namespace string, filter ...Filter) []*EnvironmentWrapper[T]
func (*Watcher[T]) ImpersonatedClient ¶
func (w *Watcher[T]) ImpersonatedClient(ctx context.Context, cluster string, opts ...ImpersonatedClientOption) (dynamic.NamespaceableResourceInterface, error)
func (*Watcher[T]) SystemAuthenticatedClient ¶
Click to show internal directories.
Click to hide internal directories.