Documentation ¶
Overview ¶
Package registrytest provides tests for Registry implementations for storing Minions, Pods, Schedulers and Services.
Index ¶
- func GetObject(fakeClient *tools.FakeEtcdClient, keyFn keyFunc, newFn newFunc, ...) (runtime.Object, error)
- func MakeMinionList(minions []string, nodeResources api.NodeResources) *api.NodeList
- func NewEtcdStorage(t *testing.T) (storage.Interface, *tools.FakeEtcdClient)
- func SetObject(fakeClient *tools.FakeEtcdClient, keyFn keyFunc, ctx api.Context, ...) error
- func SetObjectsForKey(fakeClient *tools.FakeEtcdClient, key string, objects []runtime.Object) []runtime.Object
- func SetResourceVersion(fakeClient *tools.FakeEtcdClient, resourceVersion uint64)
- type EndpointRegistry
- func (e *EndpointRegistry) DeleteEndpoints(ctx api.Context, name string) error
- func (e *EndpointRegistry) GetEndpoints(ctx api.Context, name string) (*api.Endpoints, error)
- func (e *EndpointRegistry) ListEndpoints(ctx api.Context) (*api.EndpointsList, error)
- func (e *EndpointRegistry) UpdateEndpoints(ctx api.Context, endpoints *api.Endpoints) error
- func (e *EndpointRegistry) WatchEndpoints(ctx api.Context, labels labels.Selector, fields fields.Selector, ...) (watch.Interface, error)
- type MinionRegistry
- func (r *MinionRegistry) CreateMinion(ctx api.Context, minion *api.Node) error
- func (r *MinionRegistry) DeleteMinion(ctx api.Context, minionID string) error
- func (r *MinionRegistry) GetMinion(ctx api.Context, minionID string) (*api.Node, error)
- func (r *MinionRegistry) ListMinions(ctx api.Context, label labels.Selector, field fields.Selector) (*api.NodeList, error)
- func (r *MinionRegistry) SetError(err error)
- func (r *MinionRegistry) UpdateMinion(ctx api.Context, minion *api.Node) error
- func (r *MinionRegistry) WatchMinions(ctx api.Context, label labels.Selector, field fields.Selector, ...) (watch.Interface, error)
- type ServiceRegistry
- func (r *ServiceRegistry) CreateService(ctx api.Context, svc *api.Service) (*api.Service, error)
- func (r *ServiceRegistry) DeleteService(ctx api.Context, id string) error
- func (r *ServiceRegistry) GetService(ctx api.Context, id string) (*api.Service, error)
- func (r *ServiceRegistry) ListServices(ctx api.Context, label labels.Selector, field fields.Selector) (*api.ServiceList, error)
- func (r *ServiceRegistry) SetError(err error)
- func (r *ServiceRegistry) UpdateService(ctx api.Context, svc *api.Service) (*api.Service, error)
- func (r *ServiceRegistry) WatchServices(ctx api.Context, label labels.Selector, field fields.Selector, ...) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeMinionList ¶
func MakeMinionList(minions []string, nodeResources api.NodeResources) *api.NodeList
MakeMinionList constructs api.MinionList from list of minion names and a NodeResource.
func NewEtcdStorage ¶
func SetObjectsForKey ¶
func SetResourceVersion ¶
func SetResourceVersion(fakeClient *tools.FakeEtcdClient, resourceVersion uint64)
Types ¶
type EndpointRegistry ¶
type EndpointRegistry struct { Endpoints *api.EndpointsList Updates []api.Endpoints Err error // contains filtered or unexported fields }
Registry is an interface for things that know how to store endpoints.
func (*EndpointRegistry) DeleteEndpoints ¶
func (e *EndpointRegistry) DeleteEndpoints(ctx api.Context, name string) error
func (*EndpointRegistry) GetEndpoints ¶
func (*EndpointRegistry) ListEndpoints ¶
func (e *EndpointRegistry) ListEndpoints(ctx api.Context) (*api.EndpointsList, error)
func (*EndpointRegistry) UpdateEndpoints ¶
type MinionRegistry ¶
MinionRegistry implements minion.Registry interface.
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) ListMinions ¶
func (*MinionRegistry) SetError ¶
func (r *MinionRegistry) SetError(err error)
func (*MinionRegistry) UpdateMinion ¶
type ServiceRegistry ¶
type ServiceRegistry struct { List api.ServiceList Service *api.Service Err error DeletedID string GottenID string UpdatedID string // contains filtered or unexported fields }
func NewServiceRegistry ¶
func NewServiceRegistry() *ServiceRegistry
func (*ServiceRegistry) CreateService ¶
func (*ServiceRegistry) DeleteService ¶
func (r *ServiceRegistry) DeleteService(ctx api.Context, id string) error
func (*ServiceRegistry) GetService ¶
func (*ServiceRegistry) ListServices ¶
func (r *ServiceRegistry) ListServices(ctx api.Context, label labels.Selector, field fields.Selector) (*api.ServiceList, error)
func (*ServiceRegistry) SetError ¶
func (r *ServiceRegistry) SetError(err error)
func (*ServiceRegistry) UpdateService ¶
Click to show internal directories.
Click to hide internal directories.