Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compatibility ¶ added in v1.3.2
type Compatibility interface { // Returns the local version Version() Version // Returns nil if the provided version is able to connect with the local // version. This means that the node will keep connections open with the // peer. Connectable(Version) error // Returns nil if the provided version is compatible with the local version. // This means that the version is connectable and that consensus messages // can be made to them. Compatible(Version) error // Returns nil if the provided version shouldn't be masked. This means that // the version is connectable but not compatible. The version is so old that // it should just be masked. Unmaskable(Version) error // Returns nil if the provided version will not be masked by this version. WontMask(Version) error // Returns when additional masking will occur. MaskTime() time.Time }
Compatibility a utility for checking the compatibility of peer versions
func NewCompatibility ¶ added in v1.3.2
func NewCompatibility( version Version, minCompatable Version, minCompatableTime time.Time, prevMinCompatable Version, minUnmaskable Version, minUnmaskableTime time.Time, prevMinUnmaskable Version, ) Compatibility
NewCompatibility returns a compatibility checker with the provided options
type Parser ¶
Parser defines the interface of a version parser
func NewDefaultParser ¶
func NewDefaultParser() Parser
NewDefaultParser returns a new parser with the default separators
Click to show internal directories.
Click to hide internal directories.