Documentation ¶
Index ¶
- func Objects[T Object](list []*EnvironmentWrapper[T]) []T
- type DataStore
- func (d *DataStore[T]) Add(cluster string, obj T)
- func (d *DataStore[T]) All() []*EnvironmentWrapper[T]
- func (d *DataStore[T]) Get(cluster, namespace, name string) (T, error)
- func (d *DataStore[T]) GetByCluster(cluster string, filters ...Filter) []*EnvironmentWrapper[T]
- func (d *DataStore[T]) GetByNamespace(namespace string, filters ...Filter) []*EnvironmentWrapper[T]
- func (d *DataStore[T]) Remove(cluster string, obj T)
- func (d *DataStore[T]) Update(cluster string, obj T)
- type Discovery
- type EnvironmentWrapper
- type ErrorNotFound
- type Filter
- type ImpersonatedClientOption
- type List
- 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]) 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 DataStore ¶
type DataStore[T Object] struct { // contains filtered or unexported fields }
func NewDataStore ¶
func (*DataStore[T]) All ¶
func (d *DataStore[T]) All() []*EnvironmentWrapper[T]
func (*DataStore[T]) GetByCluster ¶
func (d *DataStore[T]) GetByCluster(cluster string, filters ...Filter) []*EnvironmentWrapper[T]
func (*DataStore[T]) GetByNamespace ¶
func (d *DataStore[T]) GetByNamespace(namespace string, filters ...Filter) []*EnvironmentWrapper[T]
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 List ¶
type List[T Object] []*EnvironmentWrapper[T]
func (List[T]) Clone ¶
func (l List[T]) Clone() []*EnvironmentWrapper[T]
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
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.