Documentation ¶
Index ¶
- func IPNetFromRPC(r *manager.IPNet) *net.IPNet
- func IPNetToRPC(n *net.IPNet) *manager.IPNet
- func IsIpV6Addr(ipAddStr string) bool
- func JoinIpPort(ip net.IP, port uint16) string
- func Parse(ipStr string) (ip net.IP)
- func SplitToIPPort(netAddr net.Addr) (net.IP, uint16, error)
- type IPKey
- type IPs
- type Subnet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIpV6Addr ¶ added in v2.11.0
Types ¶
type IPKey ¶
type IPKey string
IPKey is an immutable cast of a net.IP suitable to be used as a map key. It must be created using IPKey(ip).
func (IPKey) MarshalJSON ¶ added in v2.3.1
func (IPKey) String ¶
String returns the human-readable string form of the IP (as opposed to the binary junk displayed when using it directly).
func (*IPKey) UnmarshalJSON ¶ added in v2.3.1
type IPs ¶
func IPsFromBytesSlice ¶
func UniqueSorted ¶ added in v2.8.0
func (IPs) BytesSlice ¶
BytesSlice is returns a [][]byte copy of the IPs.
func (IPs) UniqueSorted ¶
type Subnet ¶ added in v2.3.1
Subnet is a net.IPNet that can be marshalled/unmarshalled as yaml or json.
func (*Subnet) MarshalJSON ¶ added in v2.3.1
func (*Subnet) MarshalYAML ¶ added in v2.9.0
func (*Subnet) UnmarshalJSON ¶ added in v2.3.1
Click to show internal directories.
Click to hide internal directories.