Documentation
¶
Index ¶
- Constants
- type ConteinerNetworkManager
- type NetOpt
- func WithLibNetDisableBridge(disableBridge bool) NetOpt
- func WithLibNetEnableIPv6(enableIPv6 bool) NetOpt
- func WithLibNetExecRoot(execRoot string) NetOpt
- func WithLibNetFixedCIDRv4(fixedCIDRv4 string) NetOpt
- func WithLibNetGatewayIPv4(gatewayIPv4 string) NetOpt
- func WithLibNetIPForward(ipForward bool) NetOpt
- func WithLibNetIPMasq(ipMasq bool) NetOpt
- func WithLibNetIPTables(ipTables bool) NetOpt
- func WithLibNetIPV4(ipv4 string) NetOpt
- func WithLibNetIcc(icc bool) NetOpt
- func WithLibNetMetaPath(metaPath string) NetOpt
- func WithLibNetMtu(mtu int) NetOpt
- func WithLibNetName(name string) NetOpt
- func WithLibNetType(netType string) NetOpt
- func WithLibNetUserlandProxy(userlandProxy bool) NetOpt
Constants ¶
const (
// LibetworkManagerServiceLocalID sets service local ID for libnetwork manager
LibetworkManagerServiceLocalID = "container-management.service.local.v1.service-libnetwork-manager"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConteinerNetworkManager ¶
type ConteinerNetworkManager interface { // Manage performs any container network initialization operations that are needed so that a container is connectable afterwards Manage(ctx context.Context, container *types.Container) error // Connect is used to connect a container to a network. Connect(ctx context.Context, containers *types.Container) error // Disconnect disconnects the given container from given network Disconnect(ctx context.Context, container *types.Container, force bool) error // ReleaseContainerResources releases all locally allocated resources for the container by the network manager implementation - e.g. network endpoints, etc. ReleaseNetworkResources(ctx context.Context, container *types.Container) error // Dispose manages stop and dispose of the network manager Dispose(ctx context.Context) error // Restore restores all networking resources for all running containers Restore(ctx context.Context, container []*types.Container) error // Initialize initializes all base networks for the manager depending on the modes supported - currently on bridge is supported Initialize(ctx context.Context) error }
ConteinerNetworkManager abstracts container's network operations
type NetOpt ¶
type NetOpt func(netOpts *netOpts) error
NetOpt provides Network Manager Config Options
func WithLibNetDisableBridge ¶
WithLibNetDisableBridge disables the default network bridge interface creation and usage.
func WithLibNetEnableIPv6 ¶
WithLibNetEnableIPv6 enables IPv6
func WithLibNetExecRoot ¶
WithLibNetExecRoot sets network manager service's exec root.
func WithLibNetFixedCIDRv4 ¶
WithLibNetFixedCIDRv4 sets network fixed CIDRv4.
func WithLibNetGatewayIPv4 ¶
WithLibNetGatewayIPv4 sets network gateway IPv4.
func WithLibNetIPForward ¶
WithLibNetIPForward enables network IP forwarding
func WithLibNetIPMasq ¶
WithLibNetIPMasq sets network IP masquerade
func WithLibNetIPTables ¶
WithLibNetIPTables enables network IP tables
func WithLibNetMetaPath ¶
WithLibNetMetaPath sets network manager service's meta path.
func WithLibNetName ¶
WithLibNetName sets the default bridge network interface name.
func WithLibNetType ¶
WithLibNetType sets the default network interface type for the network manager service to use per container.
func WithLibNetUserlandProxy ¶
WithLibNetUserlandProxy enables usage of a network userland proxy