Documentation ¶
Overview ¶
Package generic provides a generic object store interface and a generic label/field matching type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterList ¶
func FilterList(list runtime.Object, m Matcher, d DecoratorFunc) (filtered runtime.Object, err error)
FilterList filters any list object that conforms to the api conventions, provided that 'm' works with the concrete type of list. d is an optional decorator for the returned functions. Only matching items are decorated.
Types ¶
type AttrFunc ¶
AttrFunc returns label and field sets for List or Watch to compare against, or an error.
type DecoratorFunc ¶ added in v0.3.2
DecoratorFunc can mutate the provided object prior to being returned.
type Registry ¶
type Registry interface { List(api.Context, Matcher) (runtime.Object, error) CreateWithName(ctx api.Context, id string, obj runtime.Object) error UpdateWithName(ctx api.Context, id string, obj runtime.Object) error Get(ctx api.Context, id string) (runtime.Object, error) Delete(ctx api.Context, id string) (runtime.Object, error) Watch(ctx api.Context, m Matcher, resourceVersion string) (watch.Interface, error) }
Registry knows how to store & list any runtime.Object. Can be used for any object types which don't require special features from the storage layer. DEPRECATED: replace with direct implementation of RESTStorage
type SelectionPredicate ¶
SelectionPredicate implements a generic predicate that can be passed to GenericRegistry's List or Watch methods. Implements the Matcher interface.