docker: github.com/docker/docker/vendor/github.com/docker/libnetwork/types Index | Files

package types

import "github.com/docker/docker/vendor/github.com/docker/libnetwork/types"

Package types contains types that are common across libnetwork project

Index

Package Files

types.go

Constants

const (
    IP  = iota // IPv4 and IPv6
    IPv4
    IPv6
)

constants for the IP address type

const (
    // ICMP is for the ICMP ip protocol
    ICMP = 1
    // TCP is for the TCP ip protocol
    TCP = 6
    // UDP is for the UDP ip protocol
    UDP = 17
    // SCTP is for the SCTP ip protocol
    SCTP = 132
)
const (
    // NEXTHOP indicates a StaticRoute with an IP next hop.
    NEXTHOP = iota

    // CONNECTED indicates a StaticRoute with an interface for directly connected peers.
    CONNECTED
)

func BadRequestErrorf Uses

func BadRequestErrorf(format string, params ...interface{}) error

BadRequestErrorf creates an instance of BadRequestError

func CompareIPNet Uses

func CompareIPNet(a, b *net.IPNet) bool

CompareIPNet returns equal if the two IP Networks are equal

func ForbiddenErrorf Uses

func ForbiddenErrorf(format string, params ...interface{}) error

ForbiddenErrorf creates an instance of ForbiddenError

func GetBroadcastIP Uses

func GetBroadcastIP(ip net.IP, mask net.IPMask) (net.IP, error)

GetBroadcastIP returns the broadcast ip address for the passed network (ip and mask). IP address representation is not modified. If address and mask are not compatible an error is returned.

func GetHostPartIP Uses

func GetHostPartIP(ip net.IP, mask net.IPMask) (net.IP, error)

GetHostPartIP returns the host portion of the ip address identified by the mask. IP address representation is not modified. If address and mask are not compatible an error is returned.

func GetIPCopy Uses

func GetIPCopy(from net.IP) net.IP

GetIPCopy returns a copy of the passed IP address

func GetIPNetCanonical Uses

func GetIPNetCanonical(nw *net.IPNet) *net.IPNet

GetIPNetCanonical returns the canonical form for the passed network

func GetIPNetCopy Uses

func GetIPNetCopy(from *net.IPNet) *net.IPNet

GetIPNetCopy returns a copy of the passed IP Network

func GetMacCopy Uses

func GetMacCopy(from net.HardwareAddr) net.HardwareAddr

GetMacCopy returns a copy of the passed MAC address

func GetMinimalIP Uses

func GetMinimalIP(ip net.IP) net.IP

GetMinimalIP returns the address in its shortest form If ip contains an IPv4-mapped IPv6 address, the 4-octet form of the IPv4 address will be returned. Otherwise ip is returned unchanged.

func GetMinimalIPNet Uses

func GetMinimalIPNet(nw *net.IPNet) *net.IPNet

GetMinimalIPNet returns a copy of the passed IP Network with congruent ip and mask notation

func InternalErrorf Uses

func InternalErrorf(format string, params ...interface{}) error

InternalErrorf creates an instance of InternalError

func InternalMaskableErrorf Uses

func InternalMaskableErrorf(format string, params ...interface{}) error

InternalMaskableErrorf creates an instance of InternalError and MaskableError

func IsIPNetValid Uses

func IsIPNetValid(nw *net.IPNet) bool

IsIPNetValid returns true if the ipnet is a valid network/mask combination. Otherwise returns false.

func NoServiceErrorf Uses

func NoServiceErrorf(format string, params ...interface{}) error

NoServiceErrorf creates an instance of NoServiceError

func NotFoundErrorf Uses

func NotFoundErrorf(format string, params ...interface{}) error

NotFoundErrorf creates an instance of NotFoundError

func NotImplementedErrorf Uses

func NotImplementedErrorf(format string, params ...interface{}) error

NotImplementedErrorf creates an instance of NotImplementedError

func ParseCIDR Uses

func ParseCIDR(cidr string) (n *net.IPNet, e error)

ParseCIDR returns the *net.IPNet represented by the passed CIDR notation

func RetryErrorf Uses

func RetryErrorf(format string, params ...interface{}) error

RetryErrorf creates an instance of RetryError

func TimeoutErrorf Uses

func TimeoutErrorf(format string, params ...interface{}) error

TimeoutErrorf creates an instance of TimeoutError

type BadRequestError Uses

type BadRequestError interface {
    // BadRequest makes implementer into BadRequestError type
    BadRequest()
}

BadRequestError is an interface for errors originated by a bad request

type EncryptionKey Uses

type EncryptionKey struct {
    Subsystem   string
    Algorithm   int32
    Key         []byte
    LamportTime uint64
}

EncryptionKey is the libnetwork representation of the key distributed by the lead manager.

type ErrInvalidProtocolBinding Uses

type ErrInvalidProtocolBinding string

ErrInvalidProtocolBinding is returned when the port binding protocol is not valid.

func (ErrInvalidProtocolBinding) Error Uses

func (ipb ErrInvalidProtocolBinding) Error() string

type ForbiddenError Uses

type ForbiddenError interface {
    // Forbidden makes implementer into ForbiddenError type
    Forbidden()
}

ForbiddenError is an interface for errors which denote a valid request that cannot be honored

type InterfaceStatistics Uses

type InterfaceStatistics struct {
    RxBytes   uint64
    RxPackets uint64
    RxErrors  uint64
    RxDropped uint64
    TxBytes   uint64
    TxPackets uint64
    TxErrors  uint64
    TxDropped uint64
}

InterfaceStatistics represents the interface's statistics

func (*InterfaceStatistics) String Uses

func (is *InterfaceStatistics) String() string

type InternalError Uses

type InternalError interface {
    // Internal makes implementer into InternalError type
    Internal()
}

InternalError is an interface for errors raised because of an internal error

type MaskableError Uses

type MaskableError interface {
    // Maskable makes implementer into MaskableError type
    Maskable()
}

MaskableError is an interface for errors which can be ignored by caller

type NoServiceError Uses

type NoServiceError interface {
    // NoService makes implementer into NoServiceError type
    NoService()
}

NoServiceError is an interface for errors returned when the required service is not available

type NotFoundError Uses

type NotFoundError interface {
    // NotFound makes implementer into NotFoundError type
    NotFound()
}

NotFoundError is an interface for errors raised because a needed resource is not available

type NotImplementedError Uses

type NotImplementedError interface {
    // NotImplemented makes implementer into NotImplementedError type
    NotImplemented()
}

NotImplementedError is an interface for errors raised because of requested functionality is not yet implemented

type PortBinding Uses

type PortBinding struct {
    Proto       Protocol
    IP          net.IP
    Port        uint16
    HostIP      net.IP
    HostPort    uint16
    HostPortEnd uint16
}

PortBinding represents a port binding between the container and the host

func (PortBinding) ContainerAddr Uses

func (p PortBinding) ContainerAddr() (net.Addr, error)

ContainerAddr returns the container side transport address

func (*PortBinding) Equal Uses

func (p *PortBinding) Equal(o *PortBinding) bool

Equal checks if this instance of PortBinding is equal to the passed one

func (*PortBinding) FromString Uses

func (p *PortBinding) FromString(s string) error

FromString reads the PortBinding structure from string s. String s is a triple of "protocol/containerIP:port/hostIP:port" containerIP and hostIP can be in dotted decimal ("192.0.2.1") or IPv6 ("2001:db8::68") form. Zoned addresses ("169.254.0.23%eth0" or "fe80::1ff:fe23:4567:890a%eth0") are not supported. If string s is incorrectly formatted or the IP addresses or ports cannot be parsed, FromString returns an error.

func (*PortBinding) GetCopy Uses

func (p *PortBinding) GetCopy() PortBinding

GetCopy returns a copy of this PortBinding structure instance

func (PortBinding) HostAddr Uses

func (p PortBinding) HostAddr() (net.Addr, error)

HostAddr returns the host side transport address

func (*PortBinding) String Uses

func (p *PortBinding) String() string

String returns the PortBinding structure in string form

type Protocol Uses

type Protocol uint8

Protocol represents an IP protocol number

func ParseProtocol Uses

func ParseProtocol(s string) Protocol

ParseProtocol returns the respective Protocol type for the passed string

func (Protocol) String Uses

func (p Protocol) String() string

type QosPolicy Uses

type QosPolicy struct {
    MaxEgressBandwidth uint64
}

QosPolicy represents a quality of service policy on an endpoint

type RetryError Uses

type RetryError interface {
    // Retry makes implementer into RetryError type
    Retry()
}

RetryError is an interface for errors which might get resolved through retry

type StaticRoute Uses

type StaticRoute struct {
    Destination *net.IPNet

    RouteType int // NEXT_HOP or CONNECTED

    // NextHop will be resolved by the kernel (i.e. as a loose hop).
    NextHop net.IP
}

StaticRoute is a statically-provisioned IP route.

func (*StaticRoute) GetCopy Uses

func (r *StaticRoute) GetCopy() *StaticRoute

GetCopy returns a copy of this StaticRoute structure

type TimeoutError Uses

type TimeoutError interface {
    // Timeout makes implementer into TimeoutError type
    Timeout()
}

TimeoutError is an interface for errors raised because of timeout

type TransportPort Uses

type TransportPort struct {
    Proto Protocol
    Port  uint16
}

TransportPort represents a local Layer 4 endpoint

func (*TransportPort) Equal Uses

func (t *TransportPort) Equal(o *TransportPort) bool

Equal checks if this instance of Transportport is equal to the passed one

func (*TransportPort) FromString Uses

func (t *TransportPort) FromString(s string) error

FromString reads the TransportPort structure from string

func (*TransportPort) GetCopy Uses

func (t *TransportPort) GetCopy() TransportPort

GetCopy returns a copy of this TransportPort structure instance

func (*TransportPort) String Uses

func (t *TransportPort) String() string

String returns the TransportPort structure in string form

type UUID Uses

type UUID string

UUID represents a globally unique ID of various resources like network and endpoint

Package types imports 6 packages (graph). Updated 2020-10-28. Refresh now. Tools for package owners.