Documentation
¶
Overview ¶
Package core provides CLI commands for UDS Core operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
NewCoreCommand creates the core parent command.
func NewOperatorCommand ¶
NewOperatorCommand creates the operator resource 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 ¶
func (o *OperatorMonitorOptions) Run(ctx context.Context) error
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.