Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultVersion = "1.22.0"
DefaultVersion is the client version to use when failing to get the server one
View Source
var Timeout = 4 * time.Second
Timeout is the maximum time to retrieve the version
Functions ¶
func GetVersionFromConfig ¶
func GetVersionFromConfig(rg RestConfigGetter) string
GetVersionFromConfig retrieves the configuration file and returns the version a server implements If the server is unreachable or in case of an error, it defaults to the latest version
Types ¶
type RestConfigGetter ¶
RestConfigGetter defines the interface a rest configuration loader must implement to be able to get a given version
Click to show internal directories.
Click to hide internal directories.