networkallocator

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
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 New

func New() (*NetworkAllocator, error)

New returns a new NetworkAllocator handle

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL