identifier

package
v0.3.0-beta.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PeerIDMaxLength is the maximum length accepted for a Network peer id.
	PeerIDMaxLength = 128
	// PeerIDPattern is the Network peer identifier grammar.
	PeerIDPattern = `^[a-z0-9][a-z0-9._-]{0,127}$`
)

Variables

View Source
var (
	// ErrInvalidField reports a present Network field that violates protocol rules.
	ErrInvalidField = errors.New("network: invalid field")
)

Functions

func ValidatePeerID

func ValidatePeerID(peerID string) error

ValidatePeerID reports whether the peer identifier matches the RFC grammar.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL