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, args []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) 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) 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(cmd *cobra.Command, args []string, subCfg map[string]*types.SubscriptionConfig) error
- func (a *App) SubscribeRunPoll(cmd *cobra.Command, args []string, subCfg map[string]*types.SubscriptionConfig) 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) Update(n *ctree.Leaf)
- 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 ¶ added in v0.21.0
AddOutputConfig adds an output called name, with config cfg if it does not already exist
func (*App) AddTargetConfig ¶ added in v0.21.0
func (a *App) AddTargetConfig(tc *types.TargetConfig)
AddTargetConfig adds a *TargetConfig to the configuration map
func (*App) CapPreRunE ¶ added in v0.24.0
func (*App) ClientCapabilities ¶ added in v0.21.0
func (a *App) ClientCapabilities(ctx context.Context, tc *types.TargetConfig, ext ...*gnmi_ext.Extension) (*gnmi.CapabilityResponse, error)
func (*App) ClientGet ¶ added in v0.21.0
func (a *App) ClientGet(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest) (*gnmi.GetResponse, error)
func (*App) ClientSet ¶ added in v0.21.0
func (a *App) ClientSet(ctx context.Context, tc *types.TargetConfig, req *gnmi.SetRequest) (*gnmi.SetResponse, error)
func (*App) CreateGNMIClient ¶ added in v0.24.0
func (*App) CreateTarget ¶ added in v0.21.0
func (*App) DeleteOutput ¶ added in v0.21.0
func (*App) DeleteTarget ¶ added in v0.21.0
func (*App) DiffPreRunE ¶ added in v0.24.0
func (*App) GeneratePathPreRunE ¶ added in v0.13.0
func (*App) GeneratePathRunE ¶ added in v0.13.0
func (*App) GeneratePreRunE ¶ added in v0.13.0
func (*App) GenerateRunE ¶ added in v0.13.0
func (*App) GenerateSetRequestRunE ¶ added in v0.13.0
func (*App) Get ¶ added in v0.18.0
func (a *App) Get(ctx context.Context, req *gnmi.GetRequest) (*gnmi.GetResponse, error)
func (*App) GetPreRunE ¶ added in v0.24.0
func (*App) GetRequest ¶
func (a *App) GetRequest(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest)
func (*App) GetSetPreRunE ¶ added in v0.24.0
func (*App) GetSetRequest ¶ added in v0.10.0
func (a *App) GetSetRequest(ctx context.Context, tc *types.TargetConfig, req *gnmi.GetRequest)
func (*App) GetSetRunE ¶ added in v0.24.0
func (*App) GetTargets ¶ added in v0.24.0
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 ¶ added in v0.9.0
func (*App) InitDiffFlags ¶ added in v0.14.0
InitDiffFlags used to init or reset diffCmd flags for gnmic-prompt mode
func (*App) InitGenerateFlags ¶ added in v0.13.0
func (*App) InitGeneratePathFlags ¶ added in v0.13.0
func (*App) InitGenerateSetRequestFlags ¶ added in v0.13.0
func (*App) InitGetFlags ¶ added in v0.9.0
InitGetFlags used to init or reset getCmd flags for gnmic-prompt mode
func (*App) InitGetSetFlags ¶ added in v0.10.0
InitGetSetFlags used to init or reset getsetCmd flags for gnmic-prompt mode
func (*App) InitGlobalFlags ¶ added in v0.9.0
func (a *App) InitGlobalFlags()
func (*App) InitInputs ¶ added in v0.21.0
func (*App) InitLocker ¶
func (*App) InitOutput ¶ added in v0.21.0
func (*App) InitOutputs ¶ added in v0.21.0
func (*App) InitPathFlags ¶ added in v0.13.0
func (*App) InitPromptFlags ¶ added in v0.13.0
func (*App) InitSetFlags ¶ added in v0.9.0
InitSetFlags used to init or reset setCmd flags for gnmic-prompt mode
func (*App) InitSubscribeFlags ¶ added in v0.9.0
InitSubscribeFlags used to init or reset subscribeCmd flags for gnmic-prompt mode
func (*App) LoadProtoFiles ¶ added in v0.9.0
func (a *App) LoadProtoFiles() (desc.Descriptor, error)
func (*App) PathCmdRun ¶ added in v0.13.0
func (*App) PathPreRunE ¶ added in v0.13.0
func (*App) PolledSubscriptionsTargets ¶ added in v0.21.0
PolledSubscriptionsTargets returns a map of target name to a list of subscription names that have Mode == POLL
func (*App) PromptPreRunE ¶ added in v0.13.0
PreRun resolve the glob patterns and checks if --max-suggestions is bigger that the terminal height and lowers it if needed.
func (*App) PromptRunE ¶ added in v0.13.0
func (*App) ReqCapabilities ¶
func (a *App) ReqCapabilities(ctx context.Context, tc *types.TargetConfig)
func (*App) Set ¶ added in v0.18.0
func (a *App) Set(ctx context.Context, req *gnmi.SetRequest) (*gnmi.SetResponse, error)
func (*App) SetPreRunE ¶ added in v0.24.0
func (*App) SetRequest ¶
func (a *App) SetRequest(ctx context.Context, tc *types.TargetConfig)
func (*App) StartCollector ¶ added in v0.21.0
func (*App) Subscribe ¶ added in v0.18.0
func (a *App) Subscribe(stream gnmi.GNMI_SubscribeServer) error
func (*App) SubscribePreRunE ¶ added in v0.24.0
func (*App) SubscribeRunE ¶ added in v0.24.0
func (*App) SubscribeRunONCE ¶
func (*App) SubscribeRunPoll ¶
func (*App) SubscribeRunPrompt ¶
func (*App) TargetSubscribeOnce ¶ added in v0.21.0
func (*App) TargetSubscribePoll ¶ added in v0.21.0
func (a *App) TargetSubscribePoll(ctx context.Context, tc *types.TargetConfig)
func (*App) TargetSubscribeStream ¶ added in v0.21.0
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.go
- subscribe.go
- subscribe_once.go
- subscribe_poll.go
- subscribe_prompt.go
- target.go
- tunnel.go
- utils.go
- version.go