proxycmd

package
v1.15.1-beta.6 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Proxycmd provides a interface for running provider binaries with the correct environment and error handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg Options) ([]byte, error)

Run runs a proxy command and returns its raw stdout.

func RunAndPrint

func RunAndPrint(ctx context.Context, cfg Options) error

RunAndPrint runs a proxy command and prints its stdout to the logger's info writer.

func RunAndPrintTable

func RunAndPrintTable(
	ctx context.Context,
	cfg Options,
	headers []string,
	buildRows func(payload []byte) ([][]string, error),
) error

Types

type Options

type Options struct {
	DevsyConfig *config.Config
	Provider    *provider.ProviderConfig

	// Command is the command to run, as a list of arguments. The first
	// argument is the binary to exec, and the rest are its arguments.
	Command types.StrArray

	// ExtraOptions are additional options to pass to the provider binary. They
	// are merged with the provider options from the devsy config, and take
	// precedence over them.
	ExtraOptions map[string]config.OptionValue

	// Stderr is the writer to which the provider binary's stderr is written. If
	// nil, it defaults to the logger's error writer.
	Stderr io.Writer
}

Options configures a single proxy-command invocation: which provider binary command to exec, the options environment it runs with, and how errors and stderr are reported.

Jump to

Keyboard shortcuts

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