lncfg

package
v0.5.1-beta-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientAddressDialer

func ClientAddressDialer(defaultPort string) func(string, time.Duration) (net.Conn, error)

ClientAddressDialer creates a gRPC dialer that can also dial unix socket addresses instead of just TCP addresses.

func EnforceSafeAuthentication

func EnforceSafeAuthentication(addrs []net.Addr, macaroonsActive bool) error

EnforceSafeAuthentication enforces "safe" authentication taking into account the interfaces that the RPC servers are listening on, and if macaroons are activated or not. To protect users from using dangerous config combinations, we'll prevent disabling authentication if the server is listening on a public interface.

func IsLoopback

func IsLoopback(addr string) bool

IsLoopback returns true if an address describes a loopback interface.

func IsUnix

func IsUnix(addr net.Addr) bool

IsUnix returns true if an address describes an Unix socket address.

func ListenOnAddress

func ListenOnAddress(addr net.Addr) (net.Listener, error)

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 ParseAddressString

func ParseAddressString(strAddress string, defaultPort string,
	tcpResolver tcpResolver) (net.Addr, error)

ParseAddressString converts an address in string format to a net.Addr that is compatible with lnd. UDP is not supported because lnd needs reliable connections. We accept a custom function to resolve any TCP addresses so that caller is able control exactly how resolution is performed.

func TLSListenOnAddress

func TLSListenOnAddress(addr net.Addr,
	config *tls.Config) (net.Listener, error)

TLSListenOnAddress creates a TLS listener that listens on the given address.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL