root

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 19 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProfilingOptions

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

ProfilingOptions contains settings for profiling.

func NewProfilingOptions

func NewProfilingOptions() *ProfilingOptions

NewProfilingOptions initializes ProfilingOptions with defaults.

func (*ProfilingOptions) AddFlags

func (o *ProfilingOptions) AddFlags(flagSet *pflag.FlagSet)

AddFlags adds flags for setting profiling options to the provided FlagSet.

func (*ProfilingOptions) FlushProfiling

func (o *ProfilingOptions) FlushProfiling() error

FlushProfiling stops profiling and writes remaining unwritten data.

func (*ProfilingOptions) InitProfiling

func (o *ProfilingOptions) InitProfiling() error

InitProfiling starts profiling.

type RootOptions

type RootOptions struct {
	Profiling *ProfilingOptions
	Output    output.Output
}

RootOptions contains options configured in the root command.

func NewCommand

func NewCommand(out, errOut io.Writer) (*cobra.Command, *RootOptions)

NewCommand creates a root command with useful built-in features like: - profiling - version command with different output formats - help command with different output formats - command discovery for use as a CLI plugin.

Jump to

Keyboard shortcuts

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