Documentation
¶
Index ¶
- func CleanAndExpandPath(path string) string
- func ClientAddressDialer(defaultPort string) func(context.Context, string) (net.Conn, error)
- func EnforceSafeAuthentication(addrs []net.Addr, macaroonsActive, tlsActive bool) error
- func IsLoopback(host string) bool
- func IsPrivate(addr net.Addr) bool
- func IsUnix(addr net.Addr) bool
- func ListenOnAddress(addr net.Addr) (net.Listener, error)
- func NormalizeAddresses(addrs []string, defaultPort string, tcpResolver TCPResolver) ([]net.Addr, error)
- func NormalizeNetwork(network string) string
- func ParseAddressString(strAddress string, defaultPort string, tcpResolver TCPResolver) (net.Addr, error)
- func TLSListenOnAddress(addr net.Addr, config *tls.Config) (net.Listener, error)
- type TCPResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanAndExpandPath ¶
CleanAndExpandPath expands environment variables and leading ~ in the passed path, cleans the result, and returns it.
func ClientAddressDialer ¶
ClientAddressDialer creates a gRPC dialer that can also dial unix socket addresses instead of just TCP.
func EnforceSafeAuthentication ¶
EnforceSafeAuthentication enforces "safe" authentication taking into account the interfaces that the RPC servers are listening on, and if macaroons and TLS is activated or not.
func IsLoopback ¶
IsLoopback returns true if an address describes a loopback interface.
func ListenOnAddress ¶
ListenOnAddress creates a listener that listens on the given address.
func NormalizeAddresses ¶
func NormalizeAddresses(addrs []string, defaultPort string, tcpResolver TCPResolver) ([]net.Addr, error)
NormalizeAddresses returns a new slice with all the passed addresses normalized with the given default port and all duplicates removed.
func NormalizeNetwork ¶
NormalizeNetwork returns the common name of a network type used to create file paths.
func ParseAddressString ¶
func ParseAddressString(strAddress string, defaultPort string, tcpResolver TCPResolver) (net.Addr, error)
ParseAddressString converts an address in string format to a net.Addr.