gnmi

package
v0.0.0-...-3d68596 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package gnmi implements gnmi get, set and subscribe functions

Package gnmi implements gnmi get, set and subscribe functions

Index

Constants

View Source
const CtxTimeout = 3 * time.Second

CtxTimeout for contexts

View Source
const (
	//SubTimeout for receiving subscription acknowledgement
	SubTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func Init

func Init(target *tg.Target)

Init starts a gNMI client connection to switch under test

func ProcessGetRequest

func ProcessGetRequest(greq *gnmi.GetRequest, gresp *gnmi.GetResponse) bool

ProcessGetRequest sends a request to switch and compares the response

func ProcessSetRequest

func ProcessSetRequest(sreq *gnmi.SetRequest, sresp *gnmi.SetResponse) bool

ProcessSetRequest sends a set request to switch and compares the response

func ProcessSubscribeRequest

func ProcessSubscribeRequest(sreq *gnmi.SubscribeRequest, sresp []*gnmi.SubscribeResponse, firstRespChan chan struct{}, resultChan chan bool)

ProcessSubscribeRequest opens a subscription channel to switch and processes the responses

func TearDown

func TearDown()

TearDown closes the gNMI connection

Types

This section is empty.

Jump to

Keyboard shortcuts

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