value

package
Version: v0.0.0-...-aed1ee4 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package value provides utility functions for working with gNMI TypedValue messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a, b *pb.TypedValue) bool

Equal returns true if the values in a and b are the same. This method handles only the primitive types and ScalarArrays and returns false for all other types.

func FromScalar

func FromScalar(i interface{}) (*pb.TypedValue, error)

FromScalar will convert common scalar types to their TypedValue equivalent. It will return an error if the type cannot be mapped to a scalar value.

func ToScalar

func ToScalar(tv *pb.TypedValue) (interface{}, error)

ToScalar will convert TypedValue scalar types to a Go native type. It will return an error if the TypedValue does not contain a scalar type.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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