package registrytest
import "k8s.io/kubernetes/pkg/registry/registrytest"
Package registrytest provides tests for Registry implementations for storing Minions, Pods, Schedulers and Services.
Index ¶
- func MakeMinionList(minions []string, nodeResources api.NodeResources) *api.MinionList
- type ControllerRegistry
- func (r *ControllerRegistry) CreateController(ctx api.Context, controller *api.ReplicationController) error
- func (r *ControllerRegistry) DeleteController(ctx api.Context, ID string) error
- func (r *ControllerRegistry) GetController(ctx api.Context, ID string) (*api.ReplicationController, error)
- func (r *ControllerRegistry) ListControllers(ctx api.Context) (*api.ReplicationControllerList, error)
- func (r *ControllerRegistry) UpdateController(ctx api.Context, controller *api.ReplicationController) error
- func (r *ControllerRegistry) WatchControllers(ctx api.Context, resourceVersion string) (watch.Interface, error)
- type GenericRegistry
- func NewGeneric(list runtime.Object) *GenericRegistry
- func (r *GenericRegistry) Create(ctx api.Context, id string, obj runtime.Object) error
- func (r *GenericRegistry) Delete(ctx api.Context, id string) error
- func (r *GenericRegistry) Get(ctx api.Context, id string) (runtime.Object, error)
- func (r *GenericRegistry) List(ctx api.Context, m generic.Matcher) (runtime.Object, error)
- func (r *GenericRegistry) Update(ctx api.Context, id string, obj runtime.Object) error
- func (r *GenericRegistry) Watch(ctx api.Context, m generic.Matcher, resourceVersion uint64) (watch.Interface, error)
- type MinionRegistry
- func NewMinionRegistry(minions []string, nodeResources api.NodeResources) *MinionRegistry
- func (r *MinionRegistry) CreateMinion(ctx api.Context, minion *api.Minion) error
- func (r *MinionRegistry) DeleteMinion(ctx api.Context, minionID string) error
- func (r *MinionRegistry) GetMinion(ctx api.Context, minionID string) (*api.Minion, error)
- func (r *MinionRegistry) ListMinions(ctx api.Context) (*api.MinionList, error)
- type PodRegistry
- func NewPodRegistry(pods *api.PodList) *PodRegistry
- func (r *PodRegistry) CreatePod(ctx api.Context, pod *api.Pod) error
- func (r *PodRegistry) DeletePod(ctx api.Context, podId string) error
- func (r *PodRegistry) GetPod(ctx api.Context, podId string) (*api.Pod, error)
- func (r *PodRegistry) ListPods(ctx api.Context, selector labels.Selector) (*api.PodList, error)
- func (r *PodRegistry) ListPodsPredicate(ctx api.Context, filter func(*api.Pod) bool) (*api.PodList, error)
- func (r *PodRegistry) UpdatePod(ctx api.Context, pod *api.Pod) error
- func (r *PodRegistry) WatchPods(ctx api.Context, resourceVersion string, filter func(*api.Pod) bool) (watch.Interface, error)
- type Scheduler
- type ServiceRegistry
- func NewServiceRegistry() *ServiceRegistry
- func (r *ServiceRegistry) CreateService(ctx api.Context, svc *api.Service) error
- func (r *ServiceRegistry) DeleteService(ctx api.Context, id string) error
- func (r *ServiceRegistry) GetEndpoints(ctx api.Context, id string) (*api.Endpoints, error)
- func (r *ServiceRegistry) GetService(ctx api.Context, id string) (*api.Service, error)
- func (r *ServiceRegistry) ListEndpoints(ctx api.Context) (*api.EndpointsList, error)
- func (r *ServiceRegistry) ListServices(ctx api.Context) (*api.ServiceList, error)
- func (r *ServiceRegistry) UpdateEndpoints(ctx api.Context, e *api.Endpoints) error
- func (r *ServiceRegistry) UpdateService(ctx api.Context, svc *api.Service) error
- func (r *ServiceRegistry) WatchEndpoints(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
- func (r *ServiceRegistry) WatchServices(ctx api.Context, label labels.Selector, field labels.Selector, resourceVersion string) (watch.Interface, error)
Functions ¶
func MakeMinionList ¶
func MakeMinionList(minions []string, nodeResources api.NodeResources) *api.MinionList
Types ¶
type ControllerRegistry ¶
type ControllerRegistry struct { Err error Controllers *api.ReplicationControllerList }
TODO: Why do we have this AND MemoryRegistry?
func (*ControllerRegistry) CreateController ¶
func (r *ControllerRegistry) CreateController(ctx api.Context, controller *api.ReplicationController) error
func (*ControllerRegistry) DeleteController ¶
func (r *ControllerRegistry) DeleteController(ctx api.Context, ID string) error
func (*ControllerRegistry) GetController ¶
func (r *ControllerRegistry) GetController(ctx api.Context, ID string) (*api.ReplicationController, error)
func (*ControllerRegistry) ListControllers ¶
func (r *ControllerRegistry) ListControllers(ctx api.Context) (*api.ReplicationControllerList, error)
func (*ControllerRegistry) UpdateController ¶
func (r *ControllerRegistry) UpdateController(ctx api.Context, controller *api.ReplicationController) error
func (*ControllerRegistry) WatchControllers ¶
func (r *ControllerRegistry) WatchControllers(ctx api.Context, resourceVersion string) (watch.Interface, error)
type GenericRegistry ¶
type GenericRegistry struct { Err error Object runtime.Object ObjectList runtime.Object sync.Mutex Mux *watch.Mux }
GenericRegistry knows how to store & list any runtime.Object. Events don't require any non-generic features from the storage layer.
func NewGeneric ¶
func NewGeneric(list runtime.Object) *GenericRegistry
func (*GenericRegistry) Create ¶
func (*GenericRegistry) Delete ¶
func (r *GenericRegistry) Delete(ctx api.Context, id string) error
func (*GenericRegistry) Get ¶
func (*GenericRegistry) List ¶
func (*GenericRegistry) Update ¶
func (*GenericRegistry) Watch ¶
func (r *GenericRegistry) Watch(ctx api.Context, m generic.Matcher, resourceVersion uint64) (watch.Interface, error)
type MinionRegistry ¶
func NewMinionRegistry ¶
func NewMinionRegistry(minions []string, nodeResources api.NodeResources) *MinionRegistry
func (*MinionRegistry) CreateMinion ¶
func (*MinionRegistry) DeleteMinion ¶
func (r *MinionRegistry) DeleteMinion(ctx api.Context, minionID string) error
func (*MinionRegistry) GetMinion ¶
func (*MinionRegistry) ListMinions ¶
func (r *MinionRegistry) ListMinions(ctx api.Context) (*api.MinionList, error)
type PodRegistry ¶
type PodRegistry struct { Err error Pod *api.Pod Pods *api.PodList sync.Mutex // contains filtered or unexported fields }
func NewPodRegistry ¶
func NewPodRegistry(pods *api.PodList) *PodRegistry
func (*PodRegistry) CreatePod ¶
func (*PodRegistry) DeletePod ¶
func (r *PodRegistry) DeletePod(ctx api.Context, podId string) error
func (*PodRegistry) GetPod ¶
func (*PodRegistry) ListPods ¶
func (*PodRegistry) ListPodsPredicate ¶
func (r *PodRegistry) ListPodsPredicate(ctx api.Context, filter func(*api.Pod) bool) (*api.PodList, error)
func (*PodRegistry) UpdatePod ¶
func (*PodRegistry) WatchPods ¶
func (r *PodRegistry) WatchPods(ctx api.Context, resourceVersion string, filter func(*api.Pod) bool) (watch.Interface, error)
type Scheduler ¶
func (*Scheduler) Schedule ¶
type ServiceRegistry ¶
type ServiceRegistry struct { List api.ServiceList Service *api.Service Err error Endpoints api.Endpoints EndpointsList api.EndpointsList DeletedID string GottenID string UpdatedID string }
func NewServiceRegistry ¶
func NewServiceRegistry() *ServiceRegistry
func (*ServiceRegistry) CreateService ¶
func (*ServiceRegistry) DeleteService ¶
func (r *ServiceRegistry) DeleteService(ctx api.Context, id string) error
func (*ServiceRegistry) GetEndpoints ¶
func (*ServiceRegistry) GetService ¶
func (*ServiceRegistry) ListEndpoints ¶
func (r *ServiceRegistry) ListEndpoints(ctx api.Context) (*api.EndpointsList, error)
func (*ServiceRegistry) ListServices ¶
func (r *ServiceRegistry) ListServices(ctx api.Context) (*api.ServiceList, error)
func (*ServiceRegistry) UpdateEndpoints ¶
func (*ServiceRegistry) UpdateService ¶
func (*ServiceRegistry) WatchEndpoints ¶
func (r *ServiceRegistry) WatchEndpoints(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
func (*ServiceRegistry) WatchServices ¶
func (r *ServiceRegistry) WatchServices(ctx api.Context, label labels.Selector, field labels.Selector, resourceVersion string) (watch.Interface, error)
Source Files ¶
controller.go doc.go generic.go minion.go pod.go scheduler.go service.go
- Version
- v0.4.1
- Published
- Oct 17, 2014
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 1 minute ago –
Tools for package owners.