Documentation
¶
Index ¶
- func ASCIIBytesToPrintString(b []byte) string
- func BothExists(a, b string) bool
- func BothNotExists(a, b string) bool
- func BytesToPrintString(b []byte) string
- func CtIsZero(b []byte) bool
- func EnsureAddrIPPort(a string) error
- func Exists(f string) bool
- func ExplicitBzero(b []byte)
- func GetExternalIPv4Address() (net.IP, error)
- func MkDataDir(f string) error
- func NodeIDToPrintString(id *[constants.NodeIDLength]byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ASCIIBytesToPrintString ¶
ASCIIBytesToPrintString converts the buffer b to the closest ASCII string equivalent, substituting '*' for unprintable characters.
func BothExists ¶ added in v0.0.31
func BothNotExists ¶ added in v0.0.31
func BytesToPrintString ¶ added in v0.0.50
BytesToPrintString pretty-prints a byte slice.
func CtIsZero ¶
CtIsZero returns true iff the buffer b is all 0x00, doing the check in constant time.
func EnsureAddrIPPort ¶
EnsureAddrIPPort returns nil iff the address is a raw IP + Port combination.
func ExplicitBzero ¶
func ExplicitBzero(b []byte)
ExplicitBzero explicitly clears out the buffer b, by filling it with 0x00 bytes.
func GetExternalIPv4Address ¶
GetExternalIPv4Address attempts to guess an external IPv4 address by interface enumeration.
func MkDataDir ¶
MkDataDir creates a data directory of appropriate (paranoid) permissions if it does not exist, and validates that existing directories have the intended permissions if it does exist.
func NodeIDToPrintString ¶ added in v0.0.50
func NodeIDToPrintString(id *[constants.NodeIDLength]byte) string
NodeIDToPrintString pretty-prints a node identifier.
Types ¶
This section is empty.