Documentation ¶
Overview ¶
Package binding contains the middle layer logic for bindings. Bindings are objects containing instructions for how a pod ought to be bound to a host. This allows a registry object which supports this action (ApplyBinding) to be served through an apiserver.
Index ¶
- type BindingStorage
- func (b *BindingStorage) Create(obj interface{}) (<-chan interface{}, error)
- func (*BindingStorage) Delete(id string) (<-chan interface{}, error)
- func (*BindingStorage) Get(id string) (interface{}, error)
- func (*BindingStorage) List(selector labels.Selector) (interface{}, error)
- func (*BindingStorage) New() interface{}
- func (b *BindingStorage) Update(obj interface{}) (<-chan interface{}, error)
- type MockRegistry
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindingStorage ¶
type BindingStorage struct {
// contains filtered or unexported fields
}
BindingStorage implements the RESTStorage interface. When bindings are written, it changes the location of the affected pods. This information is eventually reflected in the pod's CurrentState.Host field.
func NewBindingStorage ¶
func NewBindingStorage(bindingRegistry Registry) *BindingStorage
NewBindingStorage makes a new BindingStorage backed by the given bindingRegistry.
func (*BindingStorage) Create ¶
func (b *BindingStorage) Create(obj interface{}) (<-chan interface{}, error)
Create attempts to make the assignment indicated by the binding it recieves.
func (*BindingStorage) Delete ¶
func (*BindingStorage) Delete(id string) (<-chan interface{}, error)
Delete returns an error because bindings are write-only objects.
func (*BindingStorage) Get ¶
func (*BindingStorage) Get(id string) (interface{}, error)
Get returns an error because bindings are write-only objects.
func (*BindingStorage) List ¶
func (*BindingStorage) List(selector labels.Selector) (interface{}, error)
List returns an error because bindings are write-only objects.
func (*BindingStorage) New ¶
func (*BindingStorage) New() interface{}
New returns a new binding object fit for having data unmarshalled into it.
func (*BindingStorage) Update ¶
func (b *BindingStorage) Update(obj interface{}) (<-chan interface{}, error)
Update returns an error-- this object may not be updated.
type MockRegistry ¶
MockRegistry can be used for testing.
func (MockRegistry) ApplyBinding ¶
func (mr MockRegistry) ApplyBinding(binding *api.Binding) error