Documentation ¶
Overview ¶
Package netconf implements netconf.
Index ¶
- Constants
- func BindDeviceOpts(fn func(connection streamer.Connector, opts ...DeviceOption) device.Device, ...) func(connection streamer.Connector) device.Device
- func NewDevice(connection streamer.Connector, opts ...DeviceOption) device.Device
- type Capabilities
- type Data
- type DeviceOption
- type Hello
- type NetconfDevice
- func (m *NetconfDevice) Close()
- func (m *NetconfDevice) Connect(ctx context.Context) (err error)
- func (m *NetconfDevice) Download(paths []string) (map[string]streamer.File, error)
- func (m *NetconfDevice) Execute(command gcmd.Cmd) (gcmd.CmdRes, error)
- func (m *NetconfDevice) GetAux() map[string]any
- func (m *NetconfDevice) GetServerCapabilities() []string
- func (m *NetconfDevice) Upload(paths map[string]streamer.File) error
- type Node
- type RPCError
- type RPCReply
Constants ¶
View Source
const AuxServerCapabilities = "NetconfServerCapabilities"
Variables ¶
This section is empty.
Functions ¶
func BindDeviceOpts ¶
func BindDeviceOpts(fn func(connection streamer.Connector, opts ...DeviceOption) device.Device, opts ...DeviceOption) func(connection streamer.Connector) device.Device
Types ¶
type Capabilities ¶
type DeviceOption ¶
type DeviceOption func(*NetconfDevice)
func WithCapabilities ¶
func WithCapabilities(caps []string) DeviceOption
func WithLogger ¶
func WithLogger(l *zap.Logger) DeviceOption
type Hello ¶
type Hello struct { XMLName xml.Name `xml:"hello"` Xmlns string `xml:"xmlns,attr"` Hello Capabilities `xml:"capabilities"` SessionID string `xml:"session-id,omitempty"` }
type NetconfDevice ¶
type NetconfDevice struct {
// contains filtered or unexported fields
}
func (*NetconfDevice) Close ¶
func (m *NetconfDevice) Close()
func (*NetconfDevice) GetAux ¶
func (m *NetconfDevice) GetAux() map[string]any
func (*NetconfDevice) GetServerCapabilities ¶
func (m *NetconfDevice) GetServerCapabilities() []string
Click to show internal directories.
Click to hide internal directories.