southbound

package
v0.0.0-...-24c7f32 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capabilities

func Capabilities(target Target, request *gpb.CapabilityRequest) (*gpb.CapabilityResponse, error)

Capabilities get capabilities according to a formatted request

func CapabilitiesWithString

func CapabilitiesWithString(target Target, request string) (*gpb.CapabilityResponse, error)

CapabilitiesWithString allows a request for the capabilities by a string - can be empty

func ConnectTarget

func ConnectTarget(device topocache.Device) (Target, Key, error)

ConnectTarget connects to a given Device according to the passed information establishing a channel to it. TODO make asyc TODO lock channel to allow one request to device at each time

func Get

func Get(target Target, request *gpb.GetRequest) (*gpb.GetResponse, error)

Get can make a get request according to a formatted request

func GetWithString

func GetWithString(target Target, request string) (*gpb.GetResponse, error)

GetWithString can make a get request according by a string - can be empty

func NewSubscribeRequest

func NewSubscribeRequest(subscribeOptions *SubscribeOptions) (*gpb.SubscribeRequest, error)

NewSubscribeRequest returns a SubscribeRequest for the given paths

func Set

func Set(target Target, request *gpb.SetRequest) (*gpb.SetResponse, error)

Set can make a set request according to a formatted request

func SetWithString

func SetWithString(target Target, request string) (*gpb.SetResponse, error)

SetWithString can make a set request according by a string

func Subscribe

func Subscribe(target Target, request *gpb.SubscribeRequest, handler client.NotificationHandler) error

Subscribe initiates a subscription to a target and set of paths by establishing a new channel

Types

type Key

type Key struct {
	Key string
}

Key : Can be extended, for now is ip:port

type SubscribeOptions

type SubscribeOptions struct {
	UpdatesOnly       bool
	Prefix            string
	Mode              string
	StreamMode        string
	SampleInterval    uint64
	HeartbeatInterval uint64
	Paths             [][]string
	Origin            string
}

SubscribeOptions is the gNMI subscription request options

type Target

type Target struct {
	Destination client.Destination
	Clt         client.Impl
	Ctxt        context.Context
}

Target struct for connecting to gNMI

func GetTarget

func GetTarget(key Key) (Target, error)

GetTarget attempts to get a specific target from the targets cache

Directories

Path Synopsis
Package synchronizer synchronizes configurations down to devices
Package synchronizer synchronizes configurations down to devices
Package topocache is a mechanism for holding a cache of Devices.
Package topocache is a mechanism for holding a cache of Devices.

Jump to

Keyboard shortcuts

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