Documentation
¶
Index ¶
- Constants
- func CurrentVersion(_, versionFilePath, versionFileSource string) (v version.Version, source string, err error)
- func InstallIfNeeded(ctx context.Context, o *globals.GlobalOpts) (string, error)
- func NewGetVersions(client *http.Client, envoyVersionsURL, ua string) version.GetReleaseVersions
- func VersionUsageList() string
- func WriteCurrentVersion(v version.Version, _, versionFilePath string) error
- type LogFunc
- type Runtime
Constants ¶
const ( // CurrentVersionWorkingDirFile is used for stable "versions" and "help" output CurrentVersionWorkingDirFile = "$PWD/.envoy-version" // CurrentVersionConfigFile is used for stable "versions" and "help" output CurrentVersionConfigFile = "$FUNC_E_CONFIG_HOME/envoy-version" )
Variables ¶
This section is empty.
Functions ¶
func CurrentVersion ¶
func CurrentVersion(_, versionFilePath, versionFileSource string) (v version.Version, source string, err error)
CurrentVersion returns the first version in priority of VersionUsageList and its source or an error. The "source" and error messages returned include unexpanded variables to clarify the intended context. In the case no version was found, the version returned will be nil, not an error. versionFileSource is the display string for the version file (e.g. "$FUNC_E_HOME/version" in legacy mode, "$FUNC_E_DATA_HOME/envoy-version" otherwise).
func InstallIfNeeded ¶
InstallIfNeeded downloads an Envoy binary corresponding to globals.GlobalOpts and returns a path to it or an error.
func NewGetVersions ¶ added in v1.1.0
func NewGetVersions(client *http.Client, envoyVersionsURL, ua string) version.GetReleaseVersions
NewGetVersions creates a new Envoy versions fetcher. TODO: validate the data before returning it!
func VersionUsageList ¶
func VersionUsageList() string
VersionUsageList is the priority order of Envoy version sources. This includes unresolved variables as it is both used statically for markdown generation, and also at runtime.
Types ¶
type LogFunc ¶ added in v1.2.0
LogFunc is a printf-style logger used to surface runtime status and errors.
type Runtime ¶
type Runtime struct {
Out, Err io.Writer
OutFile, ErrFile *os.File
// contains filtered or unexported fields
}
Runtime manages an Envoy lifecycle
func NewRuntime ¶
NewRuntime creates a new Runtime that runs envoy with the given options. opts allows a user running envoy to control directories and hooks.