kubernetes: github.com/erikstmartin/kubernetes/pkg/registry/registrytest Index | Files

package registrytest

import "github.com/erikstmartin/kubernetes/pkg/registry/registrytest"

Package registrytest provides tests for Registry implementations for storing Minions, Pods, Schedulers and Services.


Package Files

controller.go doc.go generic.go minion.go pod.go scheduler.go service.go

func MakeMinionList Uses

func MakeMinionList(minions []string, nodeResources api.NodeResources) *api.MinionList

type ControllerRegistry Uses

type ControllerRegistry struct {
    Err         error
    Controllers *api.ReplicationControllerList

TODO: Why do we have this AND MemoryRegistry?

func (*ControllerRegistry) CreateController Uses

func (r *ControllerRegistry) CreateController(ctx api.Context, controller *api.ReplicationController) error

func (*ControllerRegistry) DeleteController Uses

func (r *ControllerRegistry) DeleteController(ctx api.Context, ID string) error

func (*ControllerRegistry) GetController Uses

func (r *ControllerRegistry) GetController(ctx api.Context, ID string) (*api.ReplicationController, error)

func (*ControllerRegistry) ListControllers Uses

func (r *ControllerRegistry) ListControllers(ctx api.Context) (*api.ReplicationControllerList, error)

func (*ControllerRegistry) UpdateController Uses

func (r *ControllerRegistry) UpdateController(ctx api.Context, controller *api.ReplicationController) error

func (*ControllerRegistry) WatchControllers Uses

func (r *ControllerRegistry) WatchControllers(ctx api.Context, resourceVersion string) (watch.Interface, error)

type GenericRegistry Uses

type GenericRegistry struct {
    Err        error
    Object     runtime.Object
    ObjectList runtime.Object

    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 Uses

func NewGeneric(list runtime.Object) *GenericRegistry

func (*GenericRegistry) Create Uses

func (r *GenericRegistry) Create(ctx api.Context, id string, obj runtime.Object) error

func (*GenericRegistry) Delete Uses

func (r *GenericRegistry) Delete(ctx api.Context, id string) error

func (*GenericRegistry) Get Uses

func (r *GenericRegistry) Get(ctx api.Context, id string) (runtime.Object, error)

func (*GenericRegistry) List Uses

func (r *GenericRegistry) List(ctx api.Context, m generic.Matcher) (runtime.Object, error)

func (*GenericRegistry) Update Uses

func (r *GenericRegistry) Update(ctx api.Context, id string, obj runtime.Object) error

func (*GenericRegistry) Watch Uses

func (r *GenericRegistry) Watch(ctx api.Context, m generic.Matcher, resourceVersion uint64) (watch.Interface, error)

type MinionRegistry Uses

type MinionRegistry struct {
    Err     error
    Minion  string
    Minions api.MinionList

func NewMinionRegistry Uses

func NewMinionRegistry(minions []string, nodeResources api.NodeResources) *MinionRegistry

func (*MinionRegistry) CreateMinion Uses

func (r *MinionRegistry) CreateMinion(ctx api.Context, minion *api.Minion) error

func (*MinionRegistry) DeleteMinion Uses

func (r *MinionRegistry) DeleteMinion(ctx api.Context, minionID string) error

func (*MinionRegistry) GetMinion Uses

func (r *MinionRegistry) GetMinion(ctx api.Context, minionID string) (*api.Minion, error)

func (*MinionRegistry) ListMinions Uses

func (r *MinionRegistry) ListMinions(ctx api.Context) (*api.MinionList, error)

type PodRegistry Uses

type PodRegistry struct {
    Err  error
    Pod  *api.Pod
    Pods *api.PodList
    // contains filtered or unexported fields

func NewPodRegistry Uses

func NewPodRegistry(pods *api.PodList) *PodRegistry

func (*PodRegistry) CreatePod Uses

func (r *PodRegistry) CreatePod(ctx api.Context, pod *api.Pod) error

func (*PodRegistry) DeletePod Uses

func (r *PodRegistry) DeletePod(ctx api.Context, podId string) error

func (*PodRegistry) GetPod Uses

func (r *PodRegistry) GetPod(ctx api.Context, podId string) (*api.Pod, error)

func (*PodRegistry) ListPods Uses

func (r *PodRegistry) ListPods(ctx api.Context, selector labels.Selector) (*api.PodList, error)

func (*PodRegistry) ListPodsPredicate Uses

func (r *PodRegistry) ListPodsPredicate(ctx api.Context, filter func(*api.Pod) bool) (*api.PodList, error)

func (*PodRegistry) UpdatePod Uses

func (r *PodRegistry) UpdatePod(ctx api.Context, pod *api.Pod) error

func (*PodRegistry) WatchPods Uses

func (r *PodRegistry) WatchPods(ctx api.Context, resourceVersion string, filter func(*api.Pod) bool) (watch.Interface, error)

type Scheduler Uses

type Scheduler struct {
    Err     error
    Pod     api.Pod
    Machine string

func (*Scheduler) Schedule Uses

func (s *Scheduler) Schedule(pod api.Pod, lister scheduler.MinionLister) (string, error)

type ServiceRegistry Uses

type ServiceRegistry struct {
    List          api.ServiceList
    Service       *api.Service
    Err           error
    Endpoints     api.Endpoints
    EndpointsList api.EndpointsList

    DeletedID string
    GottenID  string
    UpdatedID string
    // contains filtered or unexported fields

func NewServiceRegistry Uses

func NewServiceRegistry() *ServiceRegistry

func (*ServiceRegistry) CreateService Uses

func (r *ServiceRegistry) CreateService(ctx api.Context, svc *api.Service) error

func (*ServiceRegistry) DeleteService Uses

func (r *ServiceRegistry) DeleteService(ctx api.Context, id string) error

func (*ServiceRegistry) GetEndpoints Uses

func (r *ServiceRegistry) GetEndpoints(ctx api.Context, id string) (*api.Endpoints, error)

func (*ServiceRegistry) GetService Uses

func (r *ServiceRegistry) GetService(ctx api.Context, id string) (*api.Service, error)

func (*ServiceRegistry) ListEndpoints Uses

func (r *ServiceRegistry) ListEndpoints(ctx api.Context) (*api.EndpointsList, error)

func (*ServiceRegistry) ListServices Uses

func (r *ServiceRegistry) ListServices(ctx api.Context) (*api.ServiceList, error)

func (*ServiceRegistry) UpdateEndpoints Uses

func (r *ServiceRegistry) UpdateEndpoints(ctx api.Context, e *api.Endpoints) error

func (*ServiceRegistry) UpdateService Uses

func (r *ServiceRegistry) UpdateService(ctx api.Context, svc *api.Service) error

func (*ServiceRegistry) WatchEndpoints Uses

func (r *ServiceRegistry) WatchEndpoints(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)

func (*ServiceRegistry) WatchServices Uses

func (r *ServiceRegistry) WatchServices(ctx api.Context, label labels.Selector, field labels.Selector, resourceVersion string) (watch.Interface, error)

Package registrytest imports 7 packages (graph). Updated 2018-04-10. Refresh now. Tools for package owners.