Documentation
¶
Overview ¶
Package simple provides a TargetLoader for parsing a simple target YAML config file. Here is an example simple config:
---
connection:
my-router:
addresses:
- my-router.test.example.net:9339
credentials:
username: myusername
password: mypassword
request: my-request
meta: {}
request:
my-request:
target: *
paths:
- /components
- /interfaces/interface[name=*]/state/counters
- /qos/interfaces/interface[interface-id=*]/output/queues/queue[name=*]/state
Paths can be further disambiguated with a gNMI Origin prefix, for example:
openconfig-interfaces:/interfaces/interface[name=*]/state/counters
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSimpleTargetLoader ¶
func NewSimpleTargetLoader(config *configuration.GatewayConfig) loaders.TargetLoader
Types ¶
type ConnectionConfig ¶
type ConnectionConfig struct {
Addresses []string `yaml:"addresses"`
Request string `yaml:"request"`
Meta map[string]string `yaml:"meta"`
Credentials CredentialsConfig `yaml:"credentials"`
}
type CredentialsConfig ¶ added in v0.10.0
type RequestConfig ¶
type SimpleTargetLoader ¶
type SimpleTargetLoader struct {
// contains filtered or unexported fields
}
func (*SimpleTargetLoader) GetConfiguration ¶
func (m *SimpleTargetLoader) GetConfiguration() (*targetpb.Configuration, error)
func (*SimpleTargetLoader) Start ¶
func (m *SimpleTargetLoader) Start() error
func (*SimpleTargetLoader) WatchConfiguration ¶
func (m *SimpleTargetLoader) WatchConfiguration(targetChan chan<- *connections.TargetConnectionControl) error
type TargetConfig ¶
type TargetConfig struct {
Connection map[string]ConnectionConfig `yaml:"connection"`
Request map[string]RequestConfig `yaml:"request"`
}
Click to show internal directories.
Click to hide internal directories.