Documentation
¶
Overview ¶
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- func GopsutilInterfacesProvider() ([]net.InterfaceStat, error)
- func IPAddressesByType(addrs []net.InterfaceAddr) (ipv4, ipv6 string)
- func IsAddressIPv6(s string) bool
- func ShouldIgnoreInterface(filters map[string][]string, name string) bool
- func TCPPort() (int, error)
- type InterfacesProvider
Constants ¶
View Source
const (
IPV6_MARKER = ":"
)
Variables ¶
This section is empty.
Functions ¶
func GopsutilInterfacesProvider ¶
func GopsutilInterfacesProvider() ([]net.InterfaceStat, error)
func IPAddressesByType ¶
func IPAddressesByType(addrs []net.InterfaceAddr) (ipv4, ipv6 string)
Returns the IPv4 & IPv6 addresses from the list of InterfaceAddr. If multiple addresses of the same type exist, the last seen takes precedence.
func IsAddressIPv6 ¶
Returns if the provided string represents a valid IPv6 address.
func ShouldIgnoreInterface ¶
Returns true if we should completely ignore the given interface.
Types ¶
type InterfacesProvider ¶
type InterfacesProvider func() ([]net.InterfaceStat, error)
Click to show internal directories.
Click to hide internal directories.