version

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: AGPL-3.0 Imports: 4 Imported by: 7 modules, 30 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The full version string
	Version = "1.0.9"
	// GitCommit is set with --ldflags "-X main.gitCommit=$(git rev-parse HEAD)"
	GitCommit string
	Status    *UpdateStatus
)

Functions

func CompatibleWith added in v1.0.5

func CompatibleWith(remoteVerStr string) (bool, error)

CompatibleWith checks whether the remote peer version is compatible with the node itself. RULES: | local | remote | | - | - | | 1.0.3 | same major&moinor version. | | 1.0.4 | same major version. |

Types

type UpdateStatus added in v1.0.5

type UpdateStatus struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*UpdateStatus) AddSeed added in v1.0.5

func (s *UpdateStatus) AddSeed(seedAddr string)

func (*UpdateStatus) CheckUpdate added in v1.0.5

func (s *UpdateStatus) CheckUpdate(localVerStr string, remoteVerStr string, remoteAddr string) error

CheckUpdate checks whether there is a newer version to update. If there is, it set the "Status" variable to a proper value.

params:
	localVerStr: the version of the node itself
	remoteVerStr: the version received from a seed node.
	remoteAddr: the version received from a seed node.

current rule:

  1. small update: seed version is higher than the node itself
  2. significant update: seed mojor version is higher than the node itself

func (*UpdateStatus) MaxVerSeen added in v1.0.5

func (s *UpdateStatus) MaxVerSeen() string

func (*UpdateStatus) VersionStatus added in v1.0.5

func (s *UpdateStatus) VersionStatus() uint16

Jump to

Keyboard shortcuts

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