versionset

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0, UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VersionInfo

type VersionInfo struct {
	Name     string // abci, p2p, app, block, etc.
	Version  string // semver.
	Optional bool   // default required.
}

VersionInfo is used to negotiate between clients.

type VersionSet

type VersionSet []VersionInfo

func (VersionSet) CompatibleWith

func (pvs VersionSet) CompatibleWith(other VersionSet) (res VersionSet, err error)

Returns an error if not compatible. Otherwise, returns the set of compatible interfaces. Only the Major and Minor versions are returned; Patch, Prerelease, and Build portions of Semver2.0 are discarded in the resulting intersection VersionSet. TODO: test

func (VersionSet) Get

func (pvs VersionSet) Get(name string) (pv VersionInfo, ok bool)

func (*VersionSet) Set

func (pvs *VersionSet) Set(pv VersionInfo)

func (VersionSet) Sort

func (pvs VersionSet) Sort()

Jump to

Keyboard shortcuts

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