runtimecli

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package runtimecli owns the command surface shared by the narrow runtime binaries. It deliberately depends only on runtime-safe packages so flavor entrypoints can stay thin without importing the full client command tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRootCommand

func NewRootCommand(spec Spec, lookupEnv LookupEnv, stdout, stderr io.Writer) *cobra.Command

NewRootCommand constructs the deliberately narrow command tree shared by runtime and runtime-cloudflared. The supplied callback owns only flavor configuration and app construction.

func RunFXApp

func RunFXApp(ctx context.Context, app *fx.App, label string, failureCh <-chan error) error

RunFXApp starts one runtime Fx app, waits for cancellation, Fx shutdown, or an optional companion failure, and then stops the app with its configured timeout.

func Version

func Version(flavor string) string

Version renders static build identity for one runtime flavor without starting subprocesses or consulting a checkout.

Types

type LookupEnv

type LookupEnv func(string) (string, bool)

LookupEnv is the environment lookup contract used by runtime configuration.

type Spec

type Spec struct {
	Use      string
	Short    string
	RunShort string
	Flavor   runtimeconfig.Flavor
	Run      func(*cobra.Command, LookupEnv) error
}

Spec describes the small flavor-specific portion of one runtime command.

Jump to

Keyboard shortcuts

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