gnmiutil

package
v0.0.0-...-db8a646 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package gnmiutil contains helper functions related to gNMI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GNMIFullPath

func GNMIFullPath(prefix, path *pb.Path) *pb.Path

GNMIFullPath builds the full path from the prefix and path.

func GNMIPathEquals

func GNMIPathEquals(actual, expected *pb.Path) bool

GNMIPathEquals checks whether the two given gNMI path equal to each other.

func ToPbVal

func ToPbVal(stringVal string) (*pb.TypedValue, error)

ToPbVal convert string to TypedValue defined in gNMI proto. Supported types:

Integer: "1", "2"
Float: "1.5", "2.4"
String: "abc", "defg"
Boolean: "true", "false"
IETF JSON from file: "@ap_config.json"

func ValEqual

func ValEqual(gnmiPath *pb.Path, actual *pb.TypedValue, expected *pb.TypedValue) error

ValEqual checks whether the given two input value equal. It returns error if values are not equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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