kubernetesk8s.io/kubernetes/pkg/registry/generic Index | Files | Directories

package generic

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

Package generic provides a generic object store interface and a generic label/field matching type.

Index

Functions

func MergeFieldsSets

func MergeFieldsSets(source fields.Set, fragment fields.Set) fields.Set

MergeFieldsSets merges a fields'set from fragment into the source.

func NewRawStorage

func NewRawStorage(config *storagebackend.Config) (storage.Interface, factory.DestroyFunc)

NewRawStorage creates the low level kv storage. This is a work-around for current two layer of same storage interface. TODO: Once cacher is enabled on all registries (event registry is special), we will remove this method.

func ObjectMetaFieldsSet

func ObjectMetaFieldsSet(objectMeta *api.ObjectMeta, hasNamespaceField bool) fields.Set

ObjectMetaFieldsSet returns a fields that represents the ObjectMeta.

func UndecoratedStorage

func UndecoratedStorage(
	config *storagebackend.Config,
	capacity int,
	objectType runtime.Object,
	resourcePrefix string,
	scopeStrategy rest.NamespaceScopedStrategy,
	newListFunc func() runtime.Object,
	trigger storage.TriggerPublisherFunc) (storage.Interface, factory.DestroyFunc)

Returns given 'storageInterface' without any decoration.

Types

type RESTOptions

type RESTOptions struct {
	StorageConfig           *storagebackend.Config
	Decorator               StorageDecorator
	DeleteCollectionWorkers int

	ResourcePrefix string
}

RESTOptions is set of configuration options to generic registries.

type StorageDecorator

type StorageDecorator func(
	config *storagebackend.Config,
	capacity int,
	objectType runtime.Object,
	resourcePrefix string,
	scopeStrategy rest.NamespaceScopedStrategy,
	newListFunc func() runtime.Object,
	trigger storage.TriggerPublisherFunc) (storage.Interface, factory.DestroyFunc)

StorageDecorator is a function signature for producing a storage.Interface from given parameters.

Source Files

doc.go matcher.go options.go storage_decorator.go

Directories

PathSynopsis
pkg/registry/generic/registryPackage etcd has a generic implementation of a registry that stores things in etcd.
pkg/registry/generic/restPackage rest has generic implementations of resources used for REST responses
Version
v1.4.9
Published
Feb 15, 2017
Platform
js/wasm
Imports
8 packages
Last checked
11 minutes ago

Tools for package owners.