Source File
env.go
Belonging Package
github.com/libp2p/go-libp2p/core/pnet
package pnetimport// EnvKey defines environment variable name for forcing usage of PNet in libp2p// When environment variable of this name is set to "1" the ForcePrivateNetwork// variable will be set to true.const EnvKey = "LIBP2P_FORCE_PNET"// ForcePrivateNetwork is boolean variable that forces usage of PNet in libp2p// Setting this variable to true or setting LIBP2P_FORCE_PNET environment variable// to true will make libp2p to require private network protector.// If no network protector is provided and this variable is set to true libp2p will// refuse to connect.var ForcePrivateNetwork = falsefunc init() {ForcePrivateNetwork = os.Getenv(EnvKey) == "1"}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |