version

package
v0.0.0-...-f6bc33c Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCouldNotListNetworks = errors.New("couldn't list the networks")
View Source
var ErrNoHealthyNodeAvailableForVersionCheck = errors.New("no healthy node available for version check")

Functions

func GetNetworkVersionThroughGRPC

func GetNetworkVersionThroughGRPC(hosts []string) (string, error)

func IsUnreleased

func IsUnreleased() bool

Types

type CheckSoftwareCompatibilityResponse

type CheckSoftwareCompatibilityResponse struct {
	NetworksCompatibility []NetworkCompatibility `json:"networksCompatibility"`
}

func CheckSoftwareCompatibility

func CheckSoftwareCompatibility(netStore NetworkStore, requestVersionFn RequestVersionFn) (*CheckSoftwareCompatibilityResponse, error)

type GetSoftwareVersionResponse

type GetSoftwareVersionResponse struct {
	Version string `json:"version"`
	GitHash string `json:"gitHash"`
}

func GetSoftwareVersionInfo

func GetSoftwareVersionInfo() *GetSoftwareVersionResponse

type NetworkCompatibility

type NetworkCompatibility struct {
	Network          string `json:"network"`
	IsCompatible     bool   `json:"isCompatible"`
	RetrievedVersion string `json:"retrievedVersion"`
	Error            error  `json:"error"`
}

type NetworkStore

type NetworkStore interface {
	ListNetworks() ([]string, error)
	GetNetwork(string) (*network.Network, error)
}

type RequestVersionFn

type RequestVersionFn func(hosts []string) (string, error)

RequestVersionFn is the function in charge of retrieving the network version ran by the host lists.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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