kubernetes: github.com/erimatnor/kubernetes/pkg/registry/resourcequota Index | Files | Directories

package resourcequota

import "github.com/erimatnor/kubernetes/pkg/registry/resourcequota"

Package resourcequota provides Registry interface and it's REST implementation for storing ResourceQuota api objects.


Package Files

doc.go registry.go rest.go


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.

func MatchResourceQuota Uses

func MatchResourceQuota(label labels.Selector, field fields.Selector) generic.Matcher

MatchResourceQuota returns a generic matcher for a given label and field selector.

func ResourceQuotaToSelectableFields Uses

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.

type Registry Uses

type Registry interface {
    // ListResourceQuotas obtains a list of resourceQuotas having labels which match selector.
    ListResourceQuotas(ctx api.Context, selector labels.Selector) (*api.ResourceQuotaList, error)
    // Watch for new/changed/deleted resourceQuotas
    WatchResourceQuotas(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
    // Get a specific resourceQuota
    GetResourceQuota(ctx api.Context, resourceQuotaID string) (*api.ResourceQuota, error)
    // Create a resourceQuota based on a specification.
    CreateResourceQuota(ctx api.Context, resourceQuota *api.ResourceQuota) error
    // Update an existing resourceQuota
    UpdateResourceQuota(ctx api.Context, resourceQuota *api.ResourceQuota) error
    // Delete an existing resourceQuota
    DeleteResourceQuota(ctx api.Context, resourceQuotaID string) error

Registry is an interface implemented by things that know how to store ResourceQuota objects.

func NewRegistry Uses

func NewRegistry(s rest.StandardStorage) Registry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.



Package resourcequota imports 10 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.