Documentation ¶
Overview ¶
Package registrytest provides tests for Registry implementations for storing Minions, Pods, Schedulers and Services.
Index ¶
- type ControllerRegistry
- func (r *ControllerRegistry) CreateController(controller *api.ReplicationController) error
- func (r *ControllerRegistry) DeleteController(ID string) error
- func (r *ControllerRegistry) GetController(ID string) (*api.ReplicationController, error)
- func (r *ControllerRegistry) ListControllers() (*api.ReplicationControllerList, error)
- func (r *ControllerRegistry) UpdateController(controller *api.ReplicationController) error
- func (r *ControllerRegistry) WatchControllers(resourceVersion uint64) (watch.Interface, error)
- type MinionRegistry
- type PodRegistry
- func (r *PodRegistry) CreatePod(pod *api.Pod) error
- func (r *PodRegistry) DeletePod(podId string) error
- func (r *PodRegistry) GetPod(podId string) (*api.Pod, error)
- func (r *PodRegistry) ListPods(selector labels.Selector) (*api.PodList, error)
- func (r *PodRegistry) UpdatePod(pod *api.Pod) error
- func (r *PodRegistry) WatchPods(resourceVersion uint64, filter func(*api.Pod) bool) (watch.Interface, error)
- type Scheduler
- type ServiceRegistry
- func (r *ServiceRegistry) CreateService(svc *api.Service) error
- func (r *ServiceRegistry) DeleteService(id string) error
- func (r *ServiceRegistry) GetEndpoints(id string) (*api.Endpoints, error)
- func (r *ServiceRegistry) GetService(id string) (*api.Service, error)
- func (r *ServiceRegistry) ListEndpoints() (*api.EndpointsList, error)
- func (r *ServiceRegistry) ListServices() (*api.ServiceList, error)
- func (r *ServiceRegistry) UpdateEndpoints(e *api.Endpoints) error
- func (r *ServiceRegistry) UpdateService(svc *api.Service) error
- func (r *ServiceRegistry) WatchEndpoints(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)
- func (r *ServiceRegistry) WatchServices(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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(controller *api.ReplicationController) error
func (*ControllerRegistry) DeleteController ¶
func (r *ControllerRegistry) DeleteController(ID string) error
func (*ControllerRegistry) GetController ¶
func (r *ControllerRegistry) GetController(ID string) (*api.ReplicationController, error)
func (*ControllerRegistry) ListControllers ¶
func (r *ControllerRegistry) ListControllers() (*api.ReplicationControllerList, error)
func (*ControllerRegistry) UpdateController ¶
func (r *ControllerRegistry) UpdateController(controller *api.ReplicationController) error
func (*ControllerRegistry) WatchControllers ¶
func (r *ControllerRegistry) WatchControllers(resourceVersion uint64) (watch.Interface, error)
type MinionRegistry ¶
func NewMinionRegistry ¶
func NewMinionRegistry(minions []string) *MinionRegistry
func (*MinionRegistry) Delete ¶
func (r *MinionRegistry) Delete(minion string) error
func (*MinionRegistry) Insert ¶
func (r *MinionRegistry) Insert(minion string) error
func (*MinionRegistry) List ¶
func (r *MinionRegistry) List() ([]string, 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) DeletePod ¶
func (r *PodRegistry) DeletePod(podId string) error
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 (r *ServiceRegistry) CreateService(svc *api.Service) error
func (*ServiceRegistry) DeleteService ¶
func (r *ServiceRegistry) DeleteService(id string) error
func (*ServiceRegistry) GetEndpoints ¶
func (r *ServiceRegistry) GetEndpoints(id string) (*api.Endpoints, error)
func (*ServiceRegistry) GetService ¶
func (r *ServiceRegistry) GetService(id string) (*api.Service, error)
func (*ServiceRegistry) ListEndpoints ¶
func (r *ServiceRegistry) ListEndpoints() (*api.EndpointsList, error)
func (*ServiceRegistry) ListServices ¶
func (r *ServiceRegistry) ListServices() (*api.ServiceList, error)
func (*ServiceRegistry) UpdateEndpoints ¶
func (r *ServiceRegistry) UpdateEndpoints(e *api.Endpoints) error
func (*ServiceRegistry) UpdateService ¶
func (r *ServiceRegistry) UpdateService(svc *api.Service) error
func (*ServiceRegistry) WatchEndpoints ¶
func (*ServiceRegistry) WatchServices ¶
Click to show internal directories.
Click to hide internal directories.