Source File
error.go
Belonging Package
github.com/libp2p/go-libp2p/core/pnet
package pnet// ErrNotInPrivateNetwork is an error that should be returned by libp2p when it// tries to dial with ForcePrivateNetwork set and no PNet Protectorvar ErrNotInPrivateNetwork = NewError("private network was not configured but" +" is enforced by the environment")// Error is error type for ease of detecting PNet errorstype Error interface {IsPNetError() bool}// NewError creates new Errorfunc ( string) error {return pnetErr("privnet: " + )}// IsPNetError checks if given error is PNet Errorfunc ( error) bool {, := .(Error)return && .IsPNetError()}type pnetErr stringvar _ Error = (*pnetErr)(nil)func ( pnetErr) () string {return string()}func (pnetErr) () bool {return true}
![]() |
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. |