Documentation ¶
Index ¶
- Constants
- type NetworkAllocator
- func (na *NetworkAllocator) Allocate(n *api.Network) error
- func (na *NetworkAllocator) AllocateNode(node *api.Node) error
- func (na *NetworkAllocator) AllocateTask(t *api.Task) error
- func (na *NetworkAllocator) Deallocate(n *api.Network) error
- func (na *NetworkAllocator) DeallocateNode(node *api.Node) error
- func (na *NetworkAllocator) DeallocateTask(t *api.Task) error
- func (na *NetworkAllocator) IsAllocated(n *api.Network) bool
- func (na *NetworkAllocator) IsNodeAllocated(node *api.Node) bool
- func (na *NetworkAllocator) IsServiceAllocated(s *api.Service) bool
- func (na *NetworkAllocator) IsTaskAllocated(t *api.Task) bool
- func (na *NetworkAllocator) ServiceAllocate(s *api.Service) (err error)
- func (na *NetworkAllocator) ServiceDeallocate(s *api.Service) error
Constants ¶
const ( // DefaultDriver defines the name of the driver to be used by // default if a network without any driver name specified is // created. DefaultDriver = "overlay" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkAllocator ¶
type NetworkAllocator struct {
// contains filtered or unexported fields
}
NetworkAllocator acts as the controller for all network related operations like managing network and IPAM drivers and also creating and deleting networks and the associated resources.
func (*NetworkAllocator) Allocate ¶
func (na *NetworkAllocator) Allocate(n *api.Network) error
Allocate allocates all the necessary resources both general and driver-specific which may be specified in the NetworkSpec
func (*NetworkAllocator) AllocateNode ¶
func (na *NetworkAllocator) AllocateNode(node *api.Node) error
AllocateNode allocates the IP addresses for the network to which the node is attached.
func (*NetworkAllocator) AllocateTask ¶
func (na *NetworkAllocator) AllocateTask(t *api.Task) error
AllocateTask allocates all the endpoint resources for all the networks that a task is attached to.
func (*NetworkAllocator) Deallocate ¶
func (na *NetworkAllocator) Deallocate(n *api.Network) error
Deallocate frees all the general and driver specific resources whichs were assigned to the passed network.
func (*NetworkAllocator) DeallocateNode ¶
func (na *NetworkAllocator) DeallocateNode(node *api.Node) error
DeallocateNode deallocates the IP addresses for the network to which the node is attached.
func (*NetworkAllocator) DeallocateTask ¶
func (na *NetworkAllocator) DeallocateTask(t *api.Task) error
DeallocateTask releases all the endpoint resources for all the networks that a task is attached to.
func (*NetworkAllocator) IsAllocated ¶
func (na *NetworkAllocator) IsAllocated(n *api.Network) bool
IsAllocated returns if the passed network has been allocated or not.
func (*NetworkAllocator) IsNodeAllocated ¶
func (na *NetworkAllocator) IsNodeAllocated(node *api.Node) bool
IsNodeAllocated returns if the passed node has its network resources allocated or not.
func (*NetworkAllocator) IsServiceAllocated ¶
func (na *NetworkAllocator) IsServiceAllocated(s *api.Service) bool
IsServiceAllocated returns if the passed service has it's network resources allocated or not.
func (*NetworkAllocator) IsTaskAllocated ¶
func (na *NetworkAllocator) IsTaskAllocated(t *api.Task) bool
IsTaskAllocated returns if the passed task has it's network resources allocated or not.
func (*NetworkAllocator) ServiceAllocate ¶
func (na *NetworkAllocator) ServiceAllocate(s *api.Service) (err error)
ServiceAllocate allocates all the network resources such as virtual IP and ports needed by the service.
func (*NetworkAllocator) ServiceDeallocate ¶
func (na *NetworkAllocator) ServiceDeallocate(s *api.Service) error
ServiceDeallocate de-allocates all the network resources such as virtual IP and ports associated with the service.