Documentation ¶
Overview ¶
Package resourcequota provides Registry interface and it's REST implementation for storing ResourceQuota api objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StatusStrategy = resourcequotaStatusStrategy{Strategy}
var Strategy = resourcequotaStrategy{api.Scheme, api.SimpleNameGenerator}
Strategy is the default logic that applies when creating and updating ResourceQuota objects via the REST API.
Functions ¶
func MatchResourceQuota ¶ added in v0.13.1
MatchResourceQuota returns a generic matcher for a given label and field selector.
func ResourceQuotaToSelectableFields ¶ added in v0.13.1
func ResourceQuotaToSelectableFields(resourcequota *api.ResourceQuota) labels.Set
ResourceQuotaToSelectableFields returns a label set that represents the object TODO: fields are not labels, and the validation rules for them do not apply.
Types ¶
type Registry ¶
type Registry interface { // ListResourceQuotas obtains a list of pods having labels which match selector. ListResourceQuotas(ctx api.Context, selector labels.Selector) (*api.ResourceQuotaList, error) // Watch for new/changed/deleted pods WatchResourceQuotas(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error) // Get a specific pod GetResourceQuota(ctx api.Context, podID string) (*api.ResourceQuota, error) // Create a pod based on a specification. CreateResourceQuota(ctx api.Context, pod *api.ResourceQuota) error // Update an existing pod UpdateResourceQuota(ctx api.Context, pod *api.ResourceQuota) error // Delete an existing pod DeleteResourceQuota(ctx api.Context, podID string) error }
Registry is an interface implemented by things that know how to store ResourceQuota objects.
func NewRegistry ¶ added in v0.13.1
NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.
type Storage ¶ added in v0.13.1
type Storage interface { apiserver.RESTDeleter apiserver.RESTLister apiserver.RESTGetter apiserver.ResourceWatcher Create(ctx api.Context, obj runtime.Object) (runtime.Object, error) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool, error) }
Storage is an interface for a standard REST Storage backend TODO: move me somewhere common