Documentation ¶
Index ¶
- type APIErrors
- type App
- func (a *App) AddOutputConfig(name string, cfg map[string]interface{}) error
- func (a *App) AddTargetConfig(tc *types.TargetConfig)
- func (a *App) CapPreRunE(cmd *cobra.Command, _ []string) error
- func (a *App) CapRunE(cmd *cobra.Command, args []string) error
- func (a *App) ClientCapabilities(ctx context.Context, tc *types.TargetConfig, ext ...*gnmi_ext.Extension) (*gnmi.CapabilityResponse, error)
- func (a *App) ClientGet(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest) (*gnmi.GetResponse, error)
- func (a *App) ClientSet(ctx context.Context, tc *types.TargetConfig, req *gnmi.SetRequest) (*gnmi.SetResponse, error)
- func (a *App) Context() context.Context
- func (a *App) CreateGNMIClient(ctx context.Context, t *target.Target) error
- func (a *App) CreateTarget(name string) error
- func (a *App) DeleteOutput(name string) error
- func (a *App) DeleteTarget(ctx context.Context, name string) error
- func (a *App) DiffPreRunE(cmd *cobra.Command, args []string) error
- func (a *App) DiffRunE(cmd *cobra.Command, args []string) error
- func (a *App) DiffSetRequestRunE(cmd *cobra.Command, args []string) error
- func (a *App) DiffSetToNotifsRunE(cmd *cobra.Command, args []string) error
- func (a *App) Export(ctx context.Context, rsp *gnmi.SubscribeResponse, m outputs.Meta, ...)
- func (a *App) GeneratePathPreRunE(cmd *cobra.Command, args []string) error
- func (a *App) GeneratePathRunE(cmd *cobra.Command, args []string) error
- func (a *App) GeneratePreRunE(cmd *cobra.Command, args []string) error
- func (a *App) GenerateRunE(cmd *cobra.Command, args []string) error
- func (a *App) GenerateSetRequestRunE(cmd *cobra.Command, args []string) error
- func (a *App) Get(ctx context.Context, req *gnmi.GetRequest) (*gnmi.GetResponse, error)
- func (a *App) GetModels(ctx context.Context, tc *types.TargetConfig) ([]*gnmi.ModelData, error)
- func (a *App) GetPreRunE(cmd *cobra.Command, args []string) error
- func (a *App) GetRequest(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest)
- func (a *App) GetRun(cmd *cobra.Command, args []string) error
- func (a *App) GetSetPreRunE(cmd *cobra.Command, args []string) error
- func (a *App) GetSetRequest(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest)
- func (a *App) GetSetRunE(cmd *cobra.Command, args []string) error
- func (a *App) GetTargets() (map[string]*types.TargetConfig, error)
- func (a *App) InitCapabilitiesFlags(cmd *cobra.Command)
- func (a *App) InitDiffFlags(cmd *cobra.Command)
- func (a *App) InitDiffSetRequestFlags(cmd *cobra.Command)
- func (a *App) InitDiffSetToNotifsFlags(cmd *cobra.Command)
- func (a *App) InitGenerateFlags(cmd *cobra.Command)
- func (a *App) InitGeneratePathFlags(cmd *cobra.Command)
- func (a *App) InitGenerateSetRequestFlags(cmd *cobra.Command)
- func (a *App) InitGetFlags(cmd *cobra.Command)
- func (a *App) InitGetSetFlags(cmd *cobra.Command)
- func (a *App) InitGlobalFlags()
- func (a *App) InitInput(ctx context.Context, name string, tcs map[string]*types.TargetConfig)
- func (a *App) InitInputs(ctx context.Context)
- func (a *App) InitLocker() error
- func (a *App) InitOutput(ctx context.Context, name string, tcs map[string]*types.TargetConfig)
- func (a *App) InitOutputs(ctx context.Context)
- func (a *App) InitPathFlags(cmd *cobra.Command)
- func (a *App) InitPromptFlags(cmd *cobra.Command)
- func (a *App) InitSetFlags(cmd *cobra.Command)
- func (a *App) InitSubscribeFlags(cmd *cobra.Command)
- func (a *App) LoadProtoFiles() (desc.Descriptor, error)
- func (a *App) PathCmdRun(d, f, e []string, pgo pathGenOpts) error
- func (a *App) PathPreRunE(cmd *cobra.Command, args []string) error
- func (a *App) PathRunE(cmd *cobra.Command, args []string) error
- func (a *App) PolledSubscriptionsTargets() map[string][]string
- func (a *App) PreRunE(cmd *cobra.Command, args []string) error
- func (a *App) PrintMsg(address string, msgName string, msg proto.Message) error
- func (a *App) PromptPreRunE(cmd *cobra.Command, args []string) error
- func (a *App) PromptRunE(cmd *cobra.Command, args []string) error
- func (a *App) ReqCapabilities(ctx context.Context, tc *types.TargetConfig)
- func (a *App) Set(ctx context.Context, req *gnmi.SetRequest) (*gnmi.SetResponse, error)
- func (a *App) SetPreRunE(cmd *cobra.Command, args []string) error
- func (a *App) SetRequest(ctx context.Context, tc *types.TargetConfig)
- func (a *App) SetRunE(cmd *cobra.Command, args []string) error
- func (a *App) StartCollector(ctx context.Context)
- func (a *App) Subscribe(stream gnmi.GNMI_SubscribeServer) error
- func (a *App) SubscribePreRunE(cmd *cobra.Command, args []string) error
- func (a *App) SubscribeRunE(cmd *cobra.Command, args []string) error
- func (a *App) SubscribeRunONCE(_ *cobra.Command, _ []string) error
- func (a *App) SubscribeRunPoll(cmd *cobra.Command, args []string) error
- func (a *App) SubscribeRunPrompt(cmd *cobra.Command, args []string) error
- func (a *App) TargetSubscribeOnce(ctx context.Context, tc *types.TargetConfig) error
- func (a *App) TargetSubscribePoll(ctx context.Context, tc *types.TargetConfig)
- func (a *App) TargetSubscribeStream(ctx context.Context, tc *types.TargetConfig)
- func (a *App) VersionRun(cmd *cobra.Command, args []string)
- func (a *App) VersionUpgradeRun(cmd *cobra.Command, args []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Cfn context.CancelFunc RootCmd *cobra.Command Config *config.Config Outputs map[string]outputs.Output Inputs map[string]inputs.Input Targets map[string]*target.Target // Logger *log.Logger // prompt mode PromptMode bool PromptHistory []string SchemaTree *yang.Entry // gnmi server gnmi.UnimplementedGNMIServer // contains filtered or unexported fields }
func (*App) AddOutputConfig ¶
AddOutputConfig adds an output called name, with config cfg if it does not already exist
func (*App) AddTargetConfig ¶
func (a *App) AddTargetConfig(tc *types.TargetConfig)
AddTargetConfig adds a *TargetConfig to the configuration map
func (*App) ClientCapabilities ¶
func (a *App) ClientCapabilities(ctx context.Context, tc *types.TargetConfig, ext ...*gnmi_ext.Extension) (*gnmi.CapabilityResponse, error)
func (*App) ClientGet ¶
func (a *App) ClientGet(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest) (*gnmi.GetResponse, error)
func (*App) ClientSet ¶
func (a *App) ClientSet(ctx context.Context, tc *types.TargetConfig, req *gnmi.SetRequest) (*gnmi.SetResponse, error)
func (*App) CreateGNMIClient ¶
func (*App) CreateTarget ¶
func (*App) DeleteOutput ¶
func (*App) DiffSetRequestRunE ¶ added in v0.30.0
func (*App) DiffSetToNotifsRunE ¶ added in v0.30.0
func (*App) GeneratePathPreRunE ¶
func (*App) GeneratePathRunE ¶
func (*App) GeneratePreRunE ¶
func (*App) GenerateSetRequestRunE ¶
func (*App) Get ¶
func (a *App) Get(ctx context.Context, req *gnmi.GetRequest) (*gnmi.GetResponse, error)
func (*App) GetRequest ¶
func (a *App) GetRequest(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest)
func (*App) GetSetRequest ¶
func (a *App) GetSetRequest(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest)
func (*App) GetTargets ¶
func (a *App) GetTargets() (map[string]*types.TargetConfig, error)
GetTargets reads the targets configuration from flags or config file. If enabled it will load targets from a configured tunnel server.
func (*App) InitCapabilitiesFlags ¶
func (*App) InitDiffFlags ¶
InitDiffFlags used to init or reset diffCmd flags for gnmic-prompt mode
func (*App) InitDiffSetRequestFlags ¶ added in v0.30.0
InitDiffSetRequestFlags used to init or reset diffSetRequestCmd flags for gnmic-prompt mode
func (*App) InitDiffSetToNotifsFlags ¶ added in v0.30.0
InitDiffSetToNotifsFlags used to init or reset newDiffSetRequestCmd flags for gnmic-prompt mode
func (*App) InitGenerateFlags ¶
func (*App) InitGeneratePathFlags ¶
func (*App) InitGenerateSetRequestFlags ¶
func (*App) InitGetFlags ¶
InitGetFlags used to init or reset getCmd flags for gnmic-prompt mode
func (*App) InitGetSetFlags ¶
InitGetSetFlags used to init or reset getsetCmd flags for gnmic-prompt mode
func (*App) InitGlobalFlags ¶
func (a *App) InitGlobalFlags()
func (*App) InitInputs ¶
func (*App) InitLocker ¶
func (*App) InitOutput ¶
func (*App) InitOutputs ¶
func (*App) InitPathFlags ¶
func (*App) InitPromptFlags ¶
func (*App) InitSetFlags ¶
InitSetFlags used to init or reset setCmd flags for gnmic-prompt mode
func (*App) InitSubscribeFlags ¶
InitSubscribeFlags used to init or reset subscribeCmd flags for gnmic-prompt mode
func (*App) LoadProtoFiles ¶
func (a *App) LoadProtoFiles() (desc.Descriptor, error)
func (*App) PathCmdRun ¶
func (*App) PolledSubscriptionsTargets ¶
PolledSubscriptionsTargets returns a map of target name to a list of subscription names that have Mode == POLL
func (*App) PromptPreRunE ¶
PreRun resolve the glob patterns and checks if --max-suggestions is bigger that the terminal height and lowers it if needed.
func (*App) ReqCapabilities ¶
func (a *App) ReqCapabilities(ctx context.Context, tc *types.TargetConfig)
func (*App) Set ¶
func (a *App) Set(ctx context.Context, req *gnmi.SetRequest) (*gnmi.SetResponse, error)
func (*App) SetRequest ¶
func (a *App) SetRequest(ctx context.Context, tc *types.TargetConfig)
func (*App) StartCollector ¶
func (*App) SubscribePreRunE ¶
func (*App) SubscribeRunPoll ¶
func (*App) SubscribeRunPrompt ¶
func (*App) TargetSubscribeOnce ¶
func (*App) TargetSubscribePoll ¶
func (a *App) TargetSubscribePoll(ctx context.Context, tc *types.TargetConfig)
func (*App) TargetSubscribeStream ¶
func (a *App) TargetSubscribeStream(ctx context.Context, tc *types.TargetConfig)
Source Files ¶
- api.go
- app.go
- capabilities.go
- clustering.go
- collector.go
- const.go
- diff.go
- generate.go
- generatePath.go
- get.go
- getset.go
- gnmi_client.go
- gnmi_client_subscribe.go
- gnmi_server.go
- inputs.go
- loaders.go
- locker.go
- logging.go
- metrics.go
- outputs.go
- path.go
- prompt.go
- routes.go
- set-to-notifs.go
- set.go
- setrequest.go
- subscribe.go
- subscribe_once.go
- subscribe_poll.go
- subscribe_prompt.go
- target.go
- tunnel.go
- utils.go
- version.go