Movatterモバイル変換


[0]ホーム

URL:


types

package
v28.5.2+incompatibleLatest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2025 License:Apache-2.0Imports:7Imported by:1,869

Details

Repository

github.com/docker/docker

Links

Documentation

Overview

Package types contains types that are common across libnetwork project

Index

Constants

View Source
const (IP =iota// IPv4 and IPv6IPv4IPv6)

constants for the IP address typeDeprecated: use the consts defined in github.com/docker/docker/libnetwork/resolvconf

View Source
const (// ICMP is for the ICMP ip protocolICMP = 1// TCP is for the TCP ip protocolTCP = 6// UDP is for the UDP ip protocolUDP = 17// SCTP is for the SCTP ip protocolSCTP = 132)
View Source
const (// NEXTHOP indicates a StaticRoute with an IP next hop.NEXTHOP =iota// CONNECTED indicates a StaticRoute with an interface for directly connected peers.CONNECTED)

Variables

This section is empty.

Functions

funcCompareIPNet

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

CompareIPNet returns equal if the two IP Networks are equal

funcForbiddenErrorf

func ForbiddenErrorf(formatstring, params ...interface{})error

ForbiddenErrorf creates an instance of ForbiddenError

funcGetBroadcastIP

func GetBroadcastIP(ipnet.IP, masknet.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 compatiblean error is returned.

funcGetHostPartIP

func GetHostPartIP(ipnet.IP, masknet.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 compatiblean error is returned.

funcGetIPCopy

func GetIPCopy(fromnet.IP)net.IP

GetIPCopy returns a copy of the passed IP address

funcGetIPNetCanonical

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

GetIPNetCanonical returns the canonical form for the passed network

funcGetIPNetCopy

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

GetIPNetCopy returns a copy of the passed IP Network

funcGetMacCopy

func GetMacCopy(fromnet.HardwareAddr)net.HardwareAddr

GetMacCopy returns a copy of the passed MAC address

funcInternalErrorf

func InternalErrorf(formatstring, params ...interface{})error

InternalErrorf creates an instance of InternalError

funcInternalMaskableErrorf

func InternalMaskableErrorf(formatstring, params ...interface{})error

InternalMaskableErrorf creates an instance of InternalError and MaskableError

funcInvalidParameterErrorf

func InvalidParameterErrorf(formatstring, params ...interface{})error

InvalidParameterErrorf creates an instance of InvalidParameterError

funcIsIPNetValid

func IsIPNetValid(nw *net.IPNet)bool

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

funcNotFoundErrorf

func NotFoundErrorf(formatstring, params ...interface{})error

NotFoundErrorf creates an instance of NotFoundError

funcNotImplementedErrorf

func NotImplementedErrorf(formatstring, params ...interface{})error

NotImplementedErrorf creates an instance of NotImplementedError

funcParseCIDR

func ParseCIDR(cidrstring) (*net.IPNet,error)

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

funcUnavailableErrorf

func UnavailableErrorf(formatstring, params ...interface{})error

UnavailableErrorf creates an instance of UnavailableError

Types

typeEncryptionKey

type EncryptionKey struct {SubsystemstringAlgorithmint32Key         []byteLamportTimeuint64}

EncryptionKey is the libnetwork representation of the key distributed by the leadmanager.

typeForbiddenError

type ForbiddenError =errdefs.ErrForbidden

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

typeInterfaceStatistics

type InterfaceStatistics struct {RxBytesuint64RxPacketsuint64RxErrorsuint64RxDroppeduint64TxBytesuint64TxPacketsuint64TxErrorsuint64TxDroppeduint64}

InterfaceStatistics represents the interface's statistics

func (*InterfaceStatistics)String

func (is *InterfaceStatistics) String()string

typeInternalError

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

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

typeInvalidParameterError

type InvalidParameterError =errdefs.ErrInvalidParameter

InvalidParameterError is an interface for errors originated by a bad request

typeMaskableError

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

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

typeNotFoundError

type NotFoundError =errdefs.ErrNotFound

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

typeNotImplementedError

type NotImplementedError =errdefs.ErrNotImplemented

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

typePortBinding

type PortBinding struct {ProtoProtocolIPnet.IPPortuint16HostIPnet.IPHostPortuint16HostPortEnduint16}

PortBinding represents a port binding between the container and the host

func (PortBinding)ContainerAddr

func (pPortBinding) ContainerAddr() (net.Addr,error)

ContainerAddr returns the container side transport address

func (*PortBinding)Equal

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

Equal returns true if o has the same values as p, else false.

func (*PortBinding)GetCopy

func (p *PortBinding) GetCopy()PortBinding

GetCopy returns a copy of this PortBinding structure instance

func (PortBinding)HostAddr

func (pPortBinding) HostAddr() (net.Addr,error)

HostAddr returns the host side transport address

func (PortBinding)String

func (pPortBinding) String()string

String returns the PortBinding structure in the form "HostIP:HostPort:IP:Port/Proto",omitting un-set fields apart from Port.

typeProtocol

type Protocoluint8

Protocol represents an IP protocol number

funcParseProtocol

func ParseProtocol(sstring)Protocol

ParseProtocol returns the respective Protocol type for the passed string

func (Protocol)String

func (pProtocol) String()string

typeQosPolicy

type QosPolicy struct {MaxEgressBandwidthuint64}

QosPolicy represents a quality of service policy on an endpoint

typeStaticRoute

type StaticRoute struct {Destination *net.IPNetRouteTypeint// NEXT_HOP or CONNECTED// NextHop will be resolved by the kernel (i.e. as a loose hop).NextHopnet.IP}

StaticRoute is a statically-provisioned IP route.

func (*StaticRoute)GetCopy

func (r *StaticRoute) GetCopy() *StaticRoute

GetCopy returns a copy of this StaticRoute structure

typeTransportPort

type TransportPort struct {ProtoProtocolPortuint16}

TransportPort represents a local Layer 4 endpoint

func (*TransportPort)Equal

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

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

func (*TransportPort)GetCopy

func (t *TransportPort) GetCopy()TransportPort

GetCopy returns a copy of this TransportPort structure instance

func (*TransportPort)String

func (t *TransportPort) String()string

String returns the TransportPort structure in string form

typeUnavailableError

type UnavailableError =errdefs.ErrUnavailable

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

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp