Versions in this module Expand all Collapse all v0 v0.10.0 Aug 8, 2020 Changes in this version + const ENV_KEY_BOOTSTRAPS + const ENV_KEY_PSK + const PSK_NUM_BYTES + const RSA_MIN_BITS + func AddBootstrapFlags() (*[]multiaddr.Multiaddr, error) + func AddPSKFlag() (*pnet.PSK, error) + func CreateOrLoadKey(kf KeyFlags) (crypto.PrivKey, error) + func CreatePSK(psk string) (pnet.PSK, error) + func CreateRandPSK() (pnet.PSK, error) + func ExpandTilde(path string) (string, error) + func FileExists(filePath string) bool + func GeneratePrivKey(algo string, bits int) (crypto.PrivKey, error) + func GetBootstrapPointer() *bootstrapAddrs + func GetEnvBootstraps() ([]multiaddr.Multiaddr, error) + func GetEnvPSK() (pnet.PSK, error) + func GetEnvPSKString() string + func GetFlagPSKString() string + func GetFreePort() (int, error) + func GetIPAddress() (string, error) + func GetPSKPointer() *pskValue + func IpfsHashBytes(data []byte) (hash string, err error) + func IpfsHashFile(path string) (hash string, err error) + func LoadPrivKeyFromFile(keyFile string) (crypto.PrivKey, error) + func StorePrivKeyToFile(priv crypto.PrivKey, keyFile string) error + func StringsToMultiaddrs(stringMultiaddrs []string) ([]multiaddr.Multiaddr, error) + func Whoami(node host.Host) ([]multiaddr.Multiaddr, error) + type ExpoBackoff struct + func NewExpoBackoff(init, max time.Duration) (*ExpoBackoff, error) + func (eb *ExpoBackoff) Sleep() + type ExpoBackoffAttempts struct + func NewExpoBackoffAttempts(init, max time.Duration, attempts int) (*ExpoBackoffAttempts, error) + func (eba *ExpoBackoffAttempts) Attempt() bool + type KeyFlags struct + Algo *string + Bits *int + Ephemeral *bool + Keyfile *string + func AddKeyFlags(defaultKeyFile string) (KeyFlags, error)