Documentation
¶
Overview ¶
Package memorystore provides an in-memory Store exposing the client.Client interface.
Index ¶
- type Store
- func (s *Store) Create(_ context.Context, obj client.Object, opts ...client.CreateOption) error
- func (s *Store) Delete(_ context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (s *Store) DeleteAllOf(_ context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (s *Store) Get(_ context.Context, objectKey client.ObjectKey, obj client.Object) error
- func (s *Store) GroupKindObjects(gk schema.GroupKind) []client.Object
- func (s *Store) GroupKinds() []schema.GroupKind
- func (s *Store) List(_ context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (s *Store) Objects() []client.Object
- func (s *Store) Patch(_ context.Context, _ client.Object, _ client.Patch, _ ...client.PatchOption) error
- func (s *Store) RESTMapper() meta.RESTMapper
- func (s *Store) Scheme() *runtime.Scheme
- func (s *Store) Status() client.StatusWriter
- func (s *Store) Update(_ context.Context, obj client.Object, opts ...client.UpdateOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an in-memory store implementing client.Client.
Caution: Not all features of client.Client are implemented. Please double-check with the method documentation before using advanced features. Store does *not* check whether objects are actually namespaced or not. For schema.GroupResource of api error, Store returns Kind as Resource, e.g. instead of `v1/pods`, `v1/Pod` is returned.
func New ¶
New creates a new Store.
The given scheme is used to extract version information from the objects and to convert them from one representation into another.
func (*Store) Create ¶
Create implements client.Create. For client.CreateOption, Raw and DryRun are not supported.
func (*Store) Delete ¶
Delete implements client.Delete. For client.DeleteOption, DryRun, GracePeriodSeconds, Preconditions and PropagationPolicy are not supported.
func (*Store) DeleteAllOf ¶
func (s *Store) DeleteAllOf(_ context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
DeleteAllOf implements client.DeleteAllOf. For client.DeleteAllOfOption, check Store.List and Store.Delete for supported options.
func (*Store) GroupKindObjects ¶
GroupKindObjects returns all objects that are registered for the given schema.GroupKind.
func (*Store) GroupKinds ¶
GroupKinds returns a slice of unique schema.GroupKind instances of objects that are registered in this store.
func (*Store) List ¶
func (s *Store) List(_ context.Context, list client.ObjectList, opts ...client.ListOption) error
List implements client.List. For client.ListOption, Raw, Continue, Limit and FieldSelector are not supported.
func (*Store) Patch ¶
func (s *Store) Patch(_ context.Context, _ client.Object, _ client.Patch, _ ...client.PatchOption) error
Patch implements client.Patch. Caution: Patch is not supported / implemented.
func (*Store) RESTMapper ¶
func (s *Store) RESTMapper() meta.RESTMapper
RESTMapper implements client.Client. Caution: For Store, this returns nil.
func (*Store) Status ¶
func (s *Store) Status() client.StatusWriter
Status implements client.Status. Caution: Status does not disallow updates to fields other than status.