Documentation ¶
Index ¶
- func NewRegistryStorage(registry Registry, podRegistry pod.Registry) apiserver.RESTStorage
- type Registry
- type RegistryStorage
- func (rs *RegistryStorage) Create(obj interface{}) (<-chan interface{}, error)
- func (rs *RegistryStorage) Delete(id string) (<-chan interface{}, error)
- func (rs *RegistryStorage) Get(id string) (interface{}, error)
- func (rs *RegistryStorage) List(selector labels.Selector) (interface{}, error)
- func (rs RegistryStorage) New() interface{}
- func (rs *RegistryStorage) Update(obj interface{}) (<-chan interface{}, error)
- func (rs *RegistryStorage) Watch(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRegistryStorage ¶
func NewRegistryStorage(registry Registry, podRegistry pod.Registry) apiserver.RESTStorage
NewRegistryStorage returns a new apiserver.RESTStorage for the given registry and podRegistry.
Types ¶
type Registry ¶
type Registry interface { ListControllers() (*api.ReplicationControllerList, error) WatchControllers(resourceVersion uint64) (watch.Interface, error) GetController(controllerID string) (*api.ReplicationController, error) CreateController(controller api.ReplicationController) error UpdateController(controller api.ReplicationController) error DeleteController(controllerID string) error }
Registry is an interface for things that know how to store ReplicationControllers.
type RegistryStorage ¶
type RegistryStorage struct {
// contains filtered or unexported fields
}
RegistryStorage stores data for the replication controller service. It implements apiserver.RESTStorage.
func (*RegistryStorage) Create ¶
func (rs *RegistryStorage) Create(obj interface{}) (<-chan interface{}, error)
Create registers the given ReplicationController.
func (*RegistryStorage) Delete ¶
func (rs *RegistryStorage) Delete(id string) (<-chan interface{}, error)
Delete asynchronously deletes the ReplicationController specified by its id.
func (*RegistryStorage) Get ¶
func (rs *RegistryStorage) Get(id string) (interface{}, error)
Get obtains the ReplicationController specified by its id.
func (*RegistryStorage) List ¶
func (rs *RegistryStorage) List(selector labels.Selector) (interface{}, error)
List obtains a list of ReplicationControllers that match selector.
func (RegistryStorage) New ¶
func (rs RegistryStorage) New() interface{}
New creates a new ReplicationController for use with Create and Update.
func (*RegistryStorage) Update ¶
func (rs *RegistryStorage) Update(obj interface{}) (<-chan interface{}, error)
Update replaces a given ReplicationController instance with an existing instance in storage.registry.