Documentation ¶
Overview ¶
Package cmd contains implementation of the CLI commands.
Index ¶
- Variables
- func Execute()
- func InitOptions(cli Cli, opts GlobalOptions)
- func NewDiscoverCmd(cli Cli) *cobra.Command
- func NewExecCmd(cli Cli) *cobra.Command
- func NewInspectorCmd(cli Cli) *cobra.Command
- func NewInstancesCmd(cli Cli) *cobra.Command
- func NewRootCmd(cli Cli) *cobra.Command
- func NewTopologyCmd(cli Cli) *cobra.Command
- func NewTraceCmd(cli Cli) *cobra.Command
- func PrintCorrelatedIpSec(out io.Writer, correlations *agent.IPSecCorrelations)
- func PrintLinuxInterfacesTable(out io.Writer, instance *vpp.Instance)
- func PrintVPPInterfacesTable(out io.Writer, instance *vpp.Instance)
- func RunDiscover(cli Cli, opts DiscoverOptions) error
- func RunExec(cli Cli, opts ExecOptions) error
- func RunInstances(cli Cli, opts InstancesOptions) error
- func RunTopology(cli Cli, opts TopologyOptions) error
- func RunTrace(cli Cli, opts TraceOptions) error
- type Cli
- type CliOption
- type Colorer
- type CommandOutput
- type DiscoverOptions
- type DockerOptions
- type ExecInstance
- type ExecOptions
- type ExecutedCommand
- type GlobalOptions
- type InstancesOptions
- type KubeOptions
- type ProbeCli
- func (cli *ProbeCli) Apply(opt ...CliOption) error
- func (cli *ProbeCli) Client() client.API
- func (cli *ProbeCli) Err() io.Writer
- func (cli *ProbeCli) In() *streams.In
- func (cli *ProbeCli) Initialize(opts ProbeOptions) (err error)
- func (cli *ProbeCli) Out() *streams.Out
- func (cli *ProbeCli) Queries() []map[string]string
- type ProbeOptions
- type TopologyOptions
- type TraceOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTraceOptions = TraceOptions{ ResultDir: filepath.Join(os.TempDir(), "vppprobe-traces"), TraceNodes: tracer.DefaultNodes, NumPackets: 10000, PrintResult: false, }
Functions ¶
func InitOptions ¶
func InitOptions(cli Cli, opts GlobalOptions)
func NewDiscoverCmd ¶
func NewExecCmd ¶
func NewInspectorCmd ¶
func NewInstancesCmd ¶ added in v0.2.0
func NewTopologyCmd ¶
func NewTraceCmd ¶
func PrintCorrelatedIpSec ¶
func PrintCorrelatedIpSec(out io.Writer, correlations *agent.IPSecCorrelations)
func RunDiscover ¶
func RunDiscover(cli Cli, opts DiscoverOptions) error
func RunExec ¶
func RunExec(cli Cli, opts ExecOptions) error
func RunInstances ¶ added in v0.2.0
func RunInstances(cli Cli, opts InstancesOptions) error
func RunTopology ¶
func RunTopology(cli Cli, opts TopologyOptions) error
func RunTrace ¶
func RunTrace(cli Cli, opts TraceOptions) error
Types ¶
type CliOption ¶
func WithCombinedStreams ¶
WithCombinedStreams uses the same stream for the output and error streams.
func WithErrorStream ¶
WithErrorStream sets a cli error stream.
func WithInputStream ¶
func WithInputStream(in io.ReadCloser) CliOption
WithInputStream sets a cli input stream.
func WithOutputStream ¶
WithOutputStream sets a cli output stream.
func WithStandardStreams ¶
func WithStandardStreams() CliOption
WithStandardStreams sets a cli in, out and err streams with the standard streams.
type CommandOutput ¶
type CommandOutput string
func (CommandOutput) MarshalJSON ¶
func (e CommandOutput) MarshalJSON() ([]byte, error)
func (CommandOutput) String ¶
func (e CommandOutput) String() string
func (*CommandOutput) UnmarshalJSON ¶
func (e *CommandOutput) UnmarshalJSON(b []byte) error
type DiscoverOptions ¶
type DockerOptions ¶
type DockerOptions struct {
Host string
}
type ExecInstance ¶
type ExecInstance struct { Instance *vpp.Instance Commands []ExecutedCommand }
type ExecOptions ¶
type ExecutedCommand ¶
type GlobalOptions ¶
func (*GlobalOptions) InstallFlags ¶
func (glob *GlobalOptions) InstallFlags(flags *pflag.FlagSet)
type InstancesOptions ¶ added in v0.2.0
type KubeOptions ¶
type ProbeCli ¶
type ProbeCli struct {
// contains filtered or unexported fields
}
func NewProbeCli ¶
func (*ProbeCli) Initialize ¶
func (cli *ProbeCli) Initialize(opts ProbeOptions) (err error)
type ProbeOptions ¶
type ProbeOptions struct { Env string Queries []string CLISocket string APISocket string StatsSocket string Kube KubeOptions Docker DockerOptions }
func (*ProbeOptions) InstallFlags ¶
func (f *ProbeOptions) InstallFlags(flags *pflag.FlagSet)
type TopologyOptions ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.