core

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package core provides CLI commands for UDS Core operations.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReadLogLevel      = errors.New("reading log-level flag")
	ErrInvalidStreamKind = errors.New("invalid stream kind")
	ErrInvalidSince      = errors.New("since must not be negative")
)

These sentinels let command tests and callers classify completion and validation failures with errors.Is.

Functions

func NewCoreCommand

func NewCoreCommand(streams iostreams.IOStreams) *cobra.Command

NewCoreCommand creates the core parent command.

func NewOperatorCommand

func NewOperatorCommand(streams iostreams.IOStreams) *cobra.Command

NewOperatorCommand creates the operator resource command.

func NewOperatorMonitorCommand

func NewOperatorMonitorCommand(streams iostreams.IOStreams) *cobra.Command

NewOperatorMonitorCommand creates the core operator monitor command.

Types

type OperatorMonitorOptions

type OperatorMonitorOptions struct {
	iostreams.IOStreams

	Stream     operator.StreamKind
	Namespace  string
	Follow     bool
	Timestamps bool
	Since      time.Duration
	JSON       bool
	NoColor    bool
	LogLevel   string
	// contains filtered or unexported fields
}

OperatorMonitorOptions holds options for the core operator monitor command.

func NewOperatorMonitorOptions

func NewOperatorMonitorOptions(streams iostreams.IOStreams) *OperatorMonitorOptions

NewOperatorMonitorOptions returns a new OperatorMonitorOptions with default values.

func (*OperatorMonitorOptions) Complete

func (o *OperatorMonitorOptions) Complete(cmd *cobra.Command, args []string) error

Complete resolves the optional stream argument and inherits the root log level when the command is attached to the full CLI. Standalone command tests may omit that persistent flag.

func (*OperatorMonitorOptions) Run

Run translates command-facing options into the operator package without retaining Cobra state.

func (*OperatorMonitorOptions) Validate

func (o *OperatorMonitorOptions) Validate() error

Validate accepts an empty stream as the all-events default and rejects negative lookback durations.

Jump to

Keyboard shortcuts

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