cmd

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(
	logger *slog.Logger,
	opts Options,
) (exitCode int, serverStats server.Stats, errorsIgnored bool, err error)

Main is the CLI entry.

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

type Options

type Options struct {
	// The command to run.
	Command string
	// Command's arguments.
	Args []string

	// The remote cache host
	RemoteCacheHost string
	// Timeout used for remote cache operations
	RemoteCacheTimeout time.Duration

	// Certs for TLS (nil means insecure)
	RemoteCacheTLS *TLSCerts

	// The address to bind to
	BindAddr string
	// If true, the command will set TURBO_API, TURBO_TOKEN, and TURBO_TEAM variables (unless they are already set)
	AutoEnv bool
	// Additional environment overrides.
	Env []string

	// If true, just run the command.
	Disabled bool
	// If remote cache connection or proxy server start fails, just run the command.
	IgnoreFailures bool
}

Options carries CLI options, see Main.

type TLSCerts

type TLSCerts struct {
	CertPEM, KeyPEM []byte
}

Jump to

Keyboard shortcuts

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