Documentation ¶
Index ¶
- Constants
- func AllocatePorts(portMapper *portmapper.PortMapper, bindings []types.PortBinding, ...) ([]types.PortBinding, error)
- func ConvertPortBindings(portBindings []types.PortBinding) ([]json.RawMessage, error)
- func GetInit(networkType string) func(dc driverapi.Registerer, config map[string]interface{}) error
- func IsBuiltinLocalDriver(networkType string) bool
- func ParsePortBindingPolicies(policies []json.RawMessage) ([]types.PortBinding, error)
- func ReleasePorts(portMapper *portmapper.PortMapper, bindings []types.PortBinding) error
- type EndpointConnectivity
- type ErrUnsupportedAddressType
Constants ¶
const ( // NetworkName label for bridge driver NetworkName = "com.docker.network.windowsshim.networkname" // HNSID of the discovered network HNSID = "com.docker.network.windowsshim.hnsid" // RoutingDomain of the network RoutingDomain = "com.docker.network.windowsshim.routingdomain" // Interface of the network Interface = "com.docker.network.windowsshim.interface" // QosPolicies of the endpoint QosPolicies = "com.docker.endpoint.windowsshim.qospolicies" // VLAN of the network VLAN = "com.docker.network.windowsshim.vlanid" // VSID of the network VSID = "com.docker.network.windowsshim.vsid" // DNSSuffix of the network DNSSuffix = "com.docker.network.windowsshim.dnssuffix" // DNSServers of the network DNSServers = "com.docker.network.windowsshim.dnsservers" // MacPool of the network MacPool = "com.docker.network.windowsshim.macpool" // SourceMac of the network SourceMac = "com.docker.network.windowsshim.sourcemac" // DisableICC label DisableICC = "com.docker.network.windowsshim.disableicc" // DisableDNS label DisableDNS = "com.docker.network.windowsshim.disable_dns" // DisableGatewayDNS label DisableGatewayDNS = "com.docker.network.windowsshim.disable_gatewaydns" // EnableOutboundNat label EnableOutboundNat = "com.docker.network.windowsshim.enable_outboundnat" // OutboundNatExceptions label OutboundNatExceptions = "com.docker.network.windowsshim.outboundnat_exceptions" )
Variables ¶
This section is empty.
Functions ¶
func AllocatePorts ¶
func AllocatePorts(portMapper *portmapper.PortMapper, bindings []types.PortBinding, containerIP net.IP) ([]types.PortBinding, error)
AllocatePorts allocates ports specified in bindings from the portMapper
func ConvertPortBindings ¶
func ConvertPortBindings(portBindings []types.PortBinding) ([]json.RawMessage, error)
ConvertPortBindings converts PortBindings to JSON for HNS request
func GetInit ¶
func GetInit(networkType string) func(dc driverapi.Registerer, config map[string]interface{}) error
GetInit returns an initializer for the given network type
func IsBuiltinLocalDriver ¶
IsBuiltinLocalDriver validates if network-type is a builtin local-scoped driver
func ParsePortBindingPolicies ¶
func ParsePortBindingPolicies(policies []json.RawMessage) ([]types.PortBinding, error)
ParsePortBindingPolicies parses HNS endpoint response message to PortBindings
func ReleasePorts ¶
func ReleasePorts(portMapper *portmapper.PortMapper, bindings []types.PortBinding) error
ReleasePorts releases ports specified in bindings from the portMapper
Types ¶
type EndpointConnectivity ¶
type EndpointConnectivity struct { PortBindings []types.PortBinding ExposedPorts []types.TransportPort }
EndpointConnectivity stores the port bindings and exposed ports that the user has specified in epOptions.
func ParseEndpointConnectivity ¶
func ParseEndpointConnectivity(epOptions map[string]interface{}) (*EndpointConnectivity, error)
ParseEndpointConnectivity parses options passed to CreateEndpoint, specifically port bindings, and store in a endpointConnectivity object.
type ErrUnsupportedAddressType ¶
type ErrUnsupportedAddressType string
ErrUnsupportedAddressType is returned when the specified address type is not supported.
func (ErrUnsupportedAddressType) Error ¶
func (uat ErrUnsupportedAddressType) Error() string