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.
Click to show internal directories.
Click to hide internal directories.