kubernetesk8s.io/kubernetes/pkg/registry/resourcequotausage Index | Files

package resourcequotausage

import "k8s.io/kubernetes/pkg/registry/resourcequotausage"

Package resourcequotausage provides Registry interface and it's REST implementation for storing ResourceQuotaUsage api objects.

Index

Types

type REST

type REST struct {
	// contains filtered or unexported fields
}

REST implements the RESTStorage interface for ResourceQuotaUsage

func NewREST

func NewREST(registry Registry) *REST

NewREST creates a new REST backed by the given registry.

func (*REST) Create

func (b *REST) Create(ctx api.Context, obj runtime.Object) (runtime.Object, error)

Create takes the incoming ResourceQuotaUsage and applies the latest status atomically to a ResourceQuota

func (*REST) New

func (*REST) New() runtime.Object

New returns a new resource observation object

type Registry

type Registry interface {
	// ApplyStatus should update the ResourceQuota.Status with latest observed state.
	// This should be atomic, and idempotent based on the ResourceVersion
	ApplyStatus(ctx api.Context, usage *api.ResourceQuotaUsage) error
}

Registry contains the functions needed to support a ResourceQuotaUsage

Source Files

doc.go registry.go rest.go

Version
v0.13.0
Published
Mar 16, 2015
Platform
js/wasm
Imports
3 packages
Last checked
10 seconds ago

Tools for package owners.