Documentation
¶
Index ¶
- func NewSortableOrDie[T store.Object](ctx context.Context, storeOpts StoreOpts) store.ObjectStore[T]
- func Sortable[T store.Object](ios *InmemoryObjectStore[T], storeOpts StoreOpts) store.ObjectStore[T]
- type DatabaseOpts
- type InformerOpts
- type InmemoryObjectStore
- func (s *InmemoryObjectStore[T]) CreateOrReplace(ctx context.Context, in T) error
- func (s *InmemoryObjectStore[T]) Delete(ctx context.Context, namespace, name string) error
- func (s *InmemoryObjectStore[T]) Get(ctx context.Context, namespace, name string) (result T, err error)
- func (s *InmemoryObjectStore[T]) Info() (schema.GroupVersionResource, schema.GroupVersionKind)
- func (s *InmemoryObjectStore[T]) List(ctx context.Context, listOpts store.ListOpts) (result *store.ListResponse[T], err error)
- func (s *InmemoryObjectStore[T]) OnCreate(ctx context.Context, obj *unstructured.Unstructured) error
- func (s *InmemoryObjectStore[T]) OnDelete(ctx context.Context, obj *unstructured.Unstructured) error
- func (s *InmemoryObjectStore[T]) OnUpdate(ctx context.Context, obj *unstructured.Unstructured) error
- func (s *InmemoryObjectStore[T]) Patch(ctx context.Context, namespace, name string, ops ...store.Patch) (obj T, err error)
- func (s *InmemoryObjectStore[T]) Ready() bool
- type LoggerShim
- type SortableStore
- type StoreOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSortableOrDie ¶
func Sortable ¶
func Sortable[T store.Object](ios *InmemoryObjectStore[T], storeOpts StoreOpts) store.ObjectStore[T]
Types ¶
type DatabaseOpts ¶
type InformerOpts ¶
type InformerOpts struct {
DisableCache bool
}
type InmemoryObjectStore ¶
func (*InmemoryObjectStore[T]) CreateOrReplace ¶
func (s *InmemoryObjectStore[T]) CreateOrReplace(ctx context.Context, in T) error
CreateOrReplace creates or replaces the given object in the store. It will use the Kubernetes API to create or update the object and store the result in this store. It does not update the object in-place To get the latest version of the object, use Get after CreateOrReplace.
func (*InmemoryObjectStore[T]) Delete ¶
func (s *InmemoryObjectStore[T]) Delete(ctx context.Context, namespace, name string) error
func (*InmemoryObjectStore[T]) Get ¶
func (s *InmemoryObjectStore[T]) Get(ctx context.Context, namespace, name string) (result T, err error)
func (*InmemoryObjectStore[T]) Info ¶
func (s *InmemoryObjectStore[T]) Info() (schema.GroupVersionResource, schema.GroupVersionKind)
func (*InmemoryObjectStore[T]) List ¶
func (s *InmemoryObjectStore[T]) List(ctx context.Context, listOpts store.ListOpts) (result *store.ListResponse[T], err error)
func (*InmemoryObjectStore[T]) OnCreate ¶
func (s *InmemoryObjectStore[T]) OnCreate(ctx context.Context, obj *unstructured.Unstructured) error
func (*InmemoryObjectStore[T]) OnDelete ¶
func (s *InmemoryObjectStore[T]) OnDelete(ctx context.Context, obj *unstructured.Unstructured) error
func (*InmemoryObjectStore[T]) OnUpdate ¶
func (s *InmemoryObjectStore[T]) OnUpdate(ctx context.Context, obj *unstructured.Unstructured) error
func (*InmemoryObjectStore[T]) Ready ¶
func (s *InmemoryObjectStore[T]) Ready() bool
type LoggerShim ¶
type LoggerShim struct {
// contains filtered or unexported fields
}
func NewLoggerShim ¶
func NewLoggerShim(log logr.Logger) *LoggerShim
func (*LoggerShim) Debugf ¶
func (l *LoggerShim) Debugf(format string, args ...interface{})
func (*LoggerShim) Errorf ¶
func (l *LoggerShim) Errorf(format string, args ...interface{})
func (*LoggerShim) Infof ¶
func (l *LoggerShim) Infof(format string, args ...interface{})
func (*LoggerShim) Warningf ¶
func (l *LoggerShim) Warningf(format string, args ...interface{})
type SortableStore ¶
type SortableStore[T store.Object] struct { *InmemoryObjectStore[T] // contains filtered or unexported fields }
func (*SortableStore[T]) List ¶
func (s *SortableStore[T]) List(ctx context.Context, listOpts store.ListOpts) (*store.ListResponse[T], error)
type StoreOpts ¶
type StoreOpts struct {
Client dynamic.Interface
GVR schema.GroupVersionResource
GVK schema.GroupVersionKind
AllowedSorts []string
Database DatabaseOpts
Informer InformerOpts
// DisableRetryOnConflict disables retrying on conflict errors during updates.
// By default, retries are enabled.
DisableRetryOnConflict bool
}
Click to show internal directories.
Click to hide internal directories.