Documentation ¶
Overview ¶
Package pnet provides interfaces for private networking in dep2p.
Index ¶
Constants ¶
const EnvKey = "DeP2P_FORCE_PNET"
EnvKey defines environment variable name for forcing usage of PNet in dep2p When environment variable of this name is set to "1" the ForcePrivateNetwork variable will be set to true.
Variables ¶
var ErrNotInPrivateNetwork = NewError("private network was not configured but" +
" is enforced by the environment")
ErrNotInPrivateNetwork is an error that should be returned by dep2p when it tries to dial with ForcePrivateNetwork set and no PNet Protector
var ForcePrivateNetwork = false
ForcePrivateNetwork is boolean variable that forces usage of PNet in dep2p Setting this variable to true or setting DeP2P_FORCE_PNET environment variable to true will make dep2p to require private network protector. If no network protector is provided and this variable is set to true dep2p will refuse to connect.
Functions ¶
Types ¶
type Error ¶
type Error interface {
IsPNetError() bool
}
Error is error type for ease of detecting PNet errors