snmp

package
v0.0.0-...-e999173 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package snmp implements the 'agent snmp' subcommand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands(globalParams *command.GlobalParams) []*cobra.Command

Commands returns a slice of subcommands for the 'agent' command.

Types

type OptionsFlag

type OptionsFlag[T any] struct {
	// contains filtered or unexported fields
}

OptionsFlag is an implementation of pflag.Value that complains when set to an invalid option.

func Flag

func Flag[T any](options *snmpparse.Options[T], target *string) OptionsFlag[T]

Flag creates a flag using these options and storing the selected choice in target.

func TypedFlag

func TypedFlag[T any](options *snmpparse.Options[T], target *string, typeName string) OptionsFlag[T]

TypedFlag is the same as Flag but lets you customize how the type of flag is shown in the help.

func (OptionsFlag[T]) Set

func (a OptionsFlag[T]) Set(p string) error

Set sets the value, returning an error if the given choice isn't valid.

func (OptionsFlag[T]) String

func (a OptionsFlag[T]) String() string

String returns a string representation of this value.

func (OptionsFlag[T]) Type

func (a OptionsFlag[T]) Type() string

Type is how the value is represented in the auto-generated help.

Jump to

Keyboard shortcuts

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