package
0.0.0-20241112080837-97b903613cec
Repository: https://github.com/deepin-community/docker.io.git
Documentation: pkg.go.dev

# README

libnetwork - networking for containers

Libnetwork provides a native Go implementation for connecting containers

The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.

Design

Please refer to the design for more information.

Using libnetwork

There are many networking solutions available to suit a broad range of use-cases. libnetwork uses a driver / plugin model to support all of these solutions while abstracting the complexity of the driver implementations by exposing a simple and consistent Network Model to users.

Contributing

Want to hack on libnetwork? Docker's contributions guidelines apply.

Copyright and license

Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.

# Packages

Package bitmap provides a datatype for long vectors of bits.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package ipamapi specifies the contract the IPAM service (built-in or remote) needs to satisfy.
No description provided by the author
Package ipamutils provides utility functions for ipam management.
Package ipbits contains utilities for manipulating [netip.Addr] values as numbers or bitfields.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package options provides a way to pass unstructured sets of options to a component expecting a strongly-typed configuration structure.
Package osl describes structures and interfaces which abstract os entities.
No description provided by the author
No description provided by the author
Package resolvconf provides utility code to query and update DNS configuration in /etc/resolv.conf.
No description provided by the author
Package types contains types that are common across libnetwork project.

# Functions

CreateOptionAlias function returns an option setter for setting endpoint alias.
CreateOptionDisableResolution function returns an option setter to indicate this endpoint doesn't want embedded DNS server functionality.
CreateOptionDNS function returns an option setter for dns entry option to be passed to container Create method.
CreateOptionDNSNames specifies the list of (non fully qualified) DNS names associated to an endpoint.
CreateOptionExposedPorts function returns an option setter for the container exposed ports option to be passed to [Network.CreateEndpoint] method.
CreateOptionIpam function returns an option setter for the ipam configuration for this endpoint.
CreateOptionLoadBalancer function returns an option setter for denoting the endpoint is a load balancer for a network.
CreateOptionPortMapping function returns an option setter for the mapping ports option to be passed to [Network.CreateEndpoint] method.
CreateOptionService function returns an option setter for setting service binding configuration.
EndpointOptionGeneric function returns an option setter for a Generic option defined in a Dictionary of Key-Value pair.
JoinOptionPriority function returns an option setter for priority option to be passed to the endpoint.Join() method.
NetworkDeleteOptionRemoveLB informs a Network.Delete() operation that should remove the load balancer endpoint for this network.
NetworkOptionAttachable returns an option setter to set attachable for a network.
NetworkOptionConfigFrom tells controller to pick the network configuration from a configuration only network.
NetworkOptionConfigOnly tells controller this network is a configuration only network.
NetworkOptionDeferIPv6Alloc instructs the network to defer the IPV6 address allocation until after the endpoint has been created It is being provided to support the specific docker daemon flags where user can deterministically assign an IPv6 address to a container as combination of fixed-cidr-v6 + mac-address TODO: Remove this option setter once we support endpoint ipam options.
NetworkOptionDriverOpts function returns an option setter for any driver parameter described by a map.
NetworkOptionDynamic function returns an option setter for dynamic option for a network.
NetworkOptionEnableIPv6 returns an option setter to explicitly configure IPv6.
NetworkOptionGeneric function returns an option setter for a Generic option defined in a Dictionary of Key-Value pair.
NetworkOptionIngress returns an option setter to indicate if a network is an ingress network.
NetworkOptionInternalNetwork returns an option setter to config the network to be internal which disables default gateway service.
NetworkOptionIpam function returns an option setter for the ipam configuration for this network.
NetworkOptionLabels function returns an option setter for labels specific to a network.
NetworkOptionLBEndpoint function returns an option setter for the configuration of the load balancer endpoint for this network.
NetworkOptionPersist returns an option setter to set persistence policy for a network.
NetworkOptionScope returns an option setter to overwrite the network's scope.
New creates a new instance of network controller.
NewResolver creates a new instance of the Resolver.
OptionDNS function returns an option setter for dns entry option to be passed to container Create method.
OptionDNSOptions function returns an option setter for dns options entry option to be passed to container Create method.
OptionDNSSearch function returns an option setter for dns search entry option to be passed to container Create method.
OptionDomainname function returns an option setter for domainname option to be passed to NewSandbox method.
OptionExposedPorts function returns an option setter for the container exposed ports option to be passed to container Create method.
OptionExtraHost function returns an option setter for extra /etc/hosts options which is a name and IP as strings.
OptionGeneric function returns an option setter for Generic configuration that is not managed by libNetwork but can be used by the Drivers during the call to net container creation method.
OptionHostname function returns an option setter for hostname option to be passed to NewSandbox method.
OptionHostsPath function returns an option setter for hostspath option to be passed to NewSandbox method.
OptionIngress function returns an option setter for marking a sandbox as the controller's ingress sandbox.
OptionLoadBalancer function returns an option setter for marking a sandbox as a load balancer sandbox.
OptionOriginHostsPath function returns an option setter for origin hosts file path to be passed to NewSandbox method.
OptionOriginResolvConfPath function returns an option setter to set the path to the origin resolv.conf file to be passed to net container methods.
OptionParentUpdate function returns an option setter for parent container which needs to update the IP address for the linked container.
OptionPortMapping function returns an option setter for the mapping ports option to be passed to container Create method.
OptionResolvConfPath function returns an option setter for resolvconfpath option to be passed to net container methods.
OptionUseDefaultSandbox function returns an option setter for using default sandbox (host namespace) to be passed to container Create method.
OptionUseExternalKey function returns an option setter for using provided namespace instead of creating one.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ActiveContainerError is returned when an endpoint is deleted which has active containers attached to it.
ActiveEndpointsError is returned when a network is deleted which has active endpoints in it.
Controller manages networks.
Endpoint represents a logical connection between a network and a sandbox.
EndpointInterface holds interface addresses bound to the endpoint.
EndpointRecord specifies all the endpoint specific information that needs to gossiped to nodes participating in the network.
IpamConf contains all the ipam related configurations for a network TODO(aker): use proper net/* structs instead of string literals.
IpamInfo contains all the ipam related operational info for a network.
Network represents a logical connectivity zone that containers may join using the Link method.
PortConfig specifies an exposed port which can be addressed using the given name.
Resolver is the embedded DNS server in Docker.
Sandbox provides the control over the network container entity.
ServiceInfo has service specific details along with the list of backend tasks.
Task has the backend container details.
UnknownNetworkError is returned when libnetwork could not find in its database a network with the same name and id.

# Interfaces

DNSBackend represents a backend DNS resolver used for DNS name resolution.
EndpointInfo provides an interface to retrieve network resources bound to the endpoint.

# Type aliases

ByNetworkType sorts a [Endpoint] slice based on the network-type they're attached to.
ByTime implements sort.Interface for []*types.EncryptionKey based on the LamportTime field.
EndpointOption is an option setter function type used to pass various options to Network and Endpoint interfaces methods.
EndpointWalker is a client provided function which will be used to walk the Endpoints.
ErrInvalidID is returned when a query-by-id method is being invoked with an empty id parameter.
ErrInvalidName is returned when a query-by-name or resource create method is invoked with an empty name parameter.
ErrNoSuchEndpoint is returned when an endpoint query finds no result.
ErrNoSuchNetwork is returned when a network query finds no result.
ManagerRedirectError is returned when the request should be redirected to Manager.
NetworkDeleteOption is a type for optional parameters to pass to the Network.Delete() function.
NetworkNameError is returned when a network with the same name already exists.
NetworkOption is an option setter function type used to pass various options to NewNetwork method.
NetworkWalker is a client provided function which will be used to walk the Networks.
No description provided by the author
SandboxOption is an option setter function type used to pass various options to NewNetContainer method.