api

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package api allows go projects to use func-e as a library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, args []string, options ...RunOption) error

Run downloads Envoy and runs it as a process with the arguments passed to it. Use RunOption for configuration options.

This blocks until the context is done or the process exits. The error might be context.Canceled if the context is done or an error from the process.

Types

type RunOption

type RunOption func(*runOpts)

RunOption is configuration for Run.

func EnvoyVersion

func EnvoyVersion(envoyVersion string) RunOption

EnvoyVersion overrides the version of Envoy to run. Defaults to the contents of "$HomeDir/versions/version".

When that file is missing, it is generated from ".latestVersion" from the EnvoyVersionsURL. Its value can be in full version major.minor.patch format, e.g. 1.18.1 or without patch component, major.minor, e.g. 1.18.

func EnvoyVersionsURL

func EnvoyVersionsURL(envoyVersionsURL string) RunOption

EnvoyVersionsURL is the path to the envoy-versions.json. Defaults to "https://archive.tetratelabs.io/envoy/envoy-versions.json"

func HomeDir

func HomeDir(homeDir string) RunOption

HomeDir is an absolute path which most importantly contains "versions" installed from EnvoyVersionsURL. Defaults to "${HOME}/.func-e"

func Out

func Out(out io.Writer) RunOption

Out is where status messages are written. Defaults to os.Stdout

Jump to

Keyboard shortcuts

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