cli

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 44 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractPortFromAddress

func ExtractPortFromAddress(addr string) string

ExtractPortFromAddress extracts a numeric trailing port token from a host:port address or malformed best-effort address string.

func PublicURLAddress

func PublicURLAddress(configuredListenAddr, resolvedListenAddr string) string

PublicURLAddress derives the public-facing address using the configured listen host and the resolved runtime port.

Types

type App

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

func NewApp

func NewApp() *App

NewApp constructs an App wired to os.Stdout and os.Stderr.

func NewAppWithIO

func NewAppWithIO(stdout, stderr io.Writer) *App

NewAppWithIO constructs an App with the given output writers and the default ingestor/store constructors.

func NewAppWithIOAndHooks

func NewAppWithIOAndHooks(stdout, stderr io.Writer, hooks RuntimeHooks) *App

NewAppWithIOAndHooks constructs an App with the given writers, overriding the default ingestor/store/retriever constructors with any non-nil hooks (used by tests to inject fakes).

func (*App) Run

func (a *App) Run(args []string) int

Run is the process entrypoint: it installs a signal-cancelled context, dispatches args, and maps a clean exit after interruption to the signal-interrupt exit code.

func (*App) RunWithContext

func (a *App) RunWithContext(ctx context.Context, args []string) int

RunWithContext parses global flags and dispatches the remaining command under ctx, printing usage when no command is given.

type RuntimeHooks

type RuntimeHooks struct {
	NewIngestor  func(config.Config, model.Store) (model.Ingestor, error)
	NewStore     func(config.Config) model.Store
	NewRetriever func(config.Config, model.Store) model.Retriever
}

Jump to

Keyboard shortcuts

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