Documentation
¶
Overview ¶
Package manager provides the implementation of the network service interface
Index ¶
- type NetworkManager
- func (m *NetworkManager) Connect(ctx context.Context, networkIDOrName, containerIDOrName string, ...) error
- func (m *NetworkManager) Create(ctx context.Context, name string, options networkService.CreateOptions) (*models.Network, error)
- func (m *NetworkManager) Disconnect(ctx context.Context, networkIDOrName, containerIDOrName string, ...) error
- func (m *NetworkManager) FindNetworkByContainer(ctx context.Context, containerIDOrName string, ...) ([]*models.Network, error)
- func (m *NetworkManager) FindNetworkByName(ctx context.Context, pattern string, options networkService.ListOptions) ([]*models.Network, error)
- func (m *NetworkManager) FindNetworkBySubnet(ctx context.Context, subnet string, options networkService.ListOptions) ([]*models.Network, error)
- func (m *NetworkManager) Get(ctx context.Context, idOrName string, options networkService.GetOptions) (*models.Network, error)
- func (m *NetworkManager) GetNetworkDrivers(ctx context.Context) ([]string, error)
- func (m *NetworkManager) InspectRaw(ctx context.Context, idOrName string) (dockernetwork.Summary, error)
- func (m *NetworkManager) List(ctx context.Context, options networkService.ListOptions) ([]*models.Network, error)
- func (m *NetworkManager) Prune(ctx context.Context, options networkService.PruneOptions) (dockernetwork.PruneReport, error)
- func (m *NetworkManager) Remove(ctx context.Context, idOrName string, options networkService.RemoveOptions) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkManager ¶
type NetworkManager struct {
// contains filtered or unexported fields
}
NetworkManager implements the network.Service interface
func (*NetworkManager) Connect ¶
func (m *NetworkManager) Connect(ctx context.Context, networkIDOrName, containerIDOrName string, options networkService.ConnectOptions) error
Connect connects a container to a network
func (*NetworkManager) Create ¶
func (m *NetworkManager) Create(ctx context.Context, name string, options networkService.CreateOptions) (*models.Network, error)
Create creates a new network
func (*NetworkManager) Disconnect ¶
func (m *NetworkManager) Disconnect(ctx context.Context, networkIDOrName, containerIDOrName string, options networkService.DisconnectOptions) error
Disconnect disconnects a container from a network
func (*NetworkManager) FindNetworkByContainer ¶
func (m *NetworkManager) FindNetworkByContainer(ctx context.Context, containerIDOrName string, options networkService.ListOptions) ([]*models.Network, error)
FindNetworkByContainer finds networks connected to a container
func (*NetworkManager) FindNetworkByName ¶
func (m *NetworkManager) FindNetworkByName(ctx context.Context, pattern string, options networkService.ListOptions) ([]*models.Network, error)
FindNetworkByName finds networks by name pattern
func (*NetworkManager) FindNetworkBySubnet ¶
func (m *NetworkManager) FindNetworkBySubnet(ctx context.Context, subnet string, options networkService.ListOptions) ([]*models.Network, error)
FindNetworkBySubnet finds networks by subnet
func (*NetworkManager) Get ¶
func (m *NetworkManager) Get(ctx context.Context, idOrName string, options networkService.GetOptions) (*models.Network, error)
Get gets a network by ID or name
func (*NetworkManager) GetNetworkDrivers ¶
func (m *NetworkManager) GetNetworkDrivers(ctx context.Context) ([]string, error)
GetNetworkDrivers returns the list of available network drivers
func (*NetworkManager) InspectRaw ¶
func (m *NetworkManager) InspectRaw(ctx context.Context, idOrName string) (dockernetwork.Summary, error)
InspectRaw gets the raw information about a network
func (*NetworkManager) List ¶
func (m *NetworkManager) List(ctx context.Context, options networkService.ListOptions) ([]*models.Network, error)
List lists networks
func (*NetworkManager) Prune ¶
func (m *NetworkManager) Prune(ctx context.Context, options networkService.PruneOptions) (dockernetwork.PruneReport, error)
Prune removes unused networks
func (*NetworkManager) Remove ¶
func (m *NetworkManager) Remove(ctx context.Context, idOrName string, options networkService.RemoveOptions) error
Remove removes a network