server

package
v0.0.0-...-6ea13ce Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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

type RestConfigGetter interface {
	ToRESTConfig() (*rest.Config, error)
}

RestConfigGetter defines the interface a rest configuration loader must implement to be able to get a given version

Jump to

Keyboard shortcuts

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