invoke

package
v0.27.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(rootCmd RootCommand) *cobra.Command

Types

type RootCommand

type RootCommand interface {
	// Config returns a copy of the current server configuration.
	Config() server.ServerConfig

	// Out returns the writer used for standard output.
	Out() io.Writer

	// LoadConfig loads and merges the configuration from files, folders, and prebuilts.
	LoadConfig(ctx context.Context) error

	// Setup initializes the runtime environment, including logging and telemetry.
	// It returns the updated context and a shutdown function to be called when finished.
	Setup(ctx context.Context) (context.Context, func(context.Context) error, error)

	// Logger returns the logger instance.
	Logger() log.Logger
}

RootCommand defines the interface for required by invoke subcommand. This allows subcommands to access shared resources and functionality without direct coupling to the root command's implementation.

Jump to

Keyboard shortcuts

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