kubernetesk8s.io/kubernetes/pkg/registry/core/replicationcontroller Index | Files | Directories

package replicationcontroller

import "k8s.io/kubernetes/pkg/registry/core/replicationcontroller"

Package controller provides Registry interface and it's RESTStorage implementation for storing ReplicationController api objects.

Index

Variables

var StatusStrategy = rcStatusStrategy{Strategy}
var Strategy = rcStrategy{legacyscheme.Scheme, names.SimpleNameGenerator}

Strategy is the default logic that applies when creating and updating Replication Controller objects.

Functions

func ControllerToSelectableFields

func ControllerToSelectableFields(controller *api.ReplicationController) fields.Set

ControllerToSelectableFields returns a field set that represents the object.

func GetAttrs

func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error)

GetAttrs returns labels and fields of a given object for filtering purposes.

func MatchController

func MatchController(label labels.Selector, field fields.Selector) apistorage.SelectionPredicate

MatchController is the filter used by the generic etcd backend to route watch events from etcd to clients of the apiserver only interested in specific labels/fields.

Types

type Registry

type Registry interface {
	ListControllers(ctx context.Context, options *metainternalversion.ListOptions) (*api.ReplicationControllerList, error)
	WatchControllers(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
	GetController(ctx context.Context, controllerID string, options *metav1.GetOptions) (*api.ReplicationController, error)
	CreateController(ctx context.Context, controller *api.ReplicationController, createValidation rest.ValidateObjectFunc) (*api.ReplicationController, error)
	UpdateController(ctx context.Context, controller *api.ReplicationController, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) (*api.ReplicationController, error)
	DeleteController(ctx context.Context, controllerID string) error
}

Registry is an interface for things that know how to store ReplicationControllers.

func NewRegistry

func NewRegistry(s rest.StandardStorage) Registry

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

Source Files

doc.go registry.go strategy.go

Directories

PathSynopsis
pkg/registry/core/replicationcontroller/storage
Version
v1.11.0-beta.0
Published
May 17, 2018
Platform
js/wasm
Imports
21 packages
Last checked
8 minutes ago

Tools for package owners.