rpc

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client sends commands to JunOS and parses results

func NewClient

func NewClient(ssh *connector.SSHConnection, opts ...ClientOption) *Client

NewClient creates a new client to connect to

func (*Client) Device

func (c *Client) Device() *connector.Device

Device returns device information for the connected device

func (*Client) IsSatelliteEnabled

func (c *Client) IsSatelliteEnabled() bool

IsSatelliteEnabled returns if sattelite features are enabled on the device

func (*Client) IsScrapingLicenseEnabled

func (c *Client) IsScrapingLicenseEnabled() bool

func (*Client) RunCommandAndParse

func (c *Client) RunCommandAndParse(cmd string, obj interface{}) error

RunCommandAndParse runs a command on JunOS and unmarshals the XML result

func (*Client) RunCommandAndParseWithParser

func (c *Client) RunCommandAndParseWithParser(cmd string, parser Parser) error

RunCommandAndParseWithParser runs a command on JunOS and unmarshals the XML result using the specified parser function

type ClientOption

type ClientOption func(*Client)

func WithDebug

func WithDebug() ClientOption

func WithLicenseInformation

func WithLicenseInformation() ClientOption

func WithSatellite

func WithSatellite() ClientOption

type Parser

type Parser func([]byte) error

Parser parses XML of RPC-Output

Jump to

Keyboard shortcuts

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