utils

package
v1.18.0-beta9 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBinary

func GetBinary(params GetBinaryParams) (string, error)

GetBinary uses the passed params structure to get a binary for the service in the first found of 3 locations:

1. specified via environment variable

2. matching binary already on path

3. download the hard-coded version via docker and extract the binary from that

Types

type GetBinaryParams

type GetBinaryParams struct {
	Filename    string // the name of the binary on the $PATH or in the docker container
	DockerImage string // the docker image to use if Env or Local are not present
	DockerPath  string // the location of the binary in the docker container, including the filename
	EnvKey      string // the environment var to look at for a user-specified service binary
	TmpDir      string // the temp directory to store a downloaded binary if needed
}

Jump to

Keyboard shortcuts

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