Documentation ¶
Index ¶
Constants ¶
const Type = "gnmi"
Type defines the name resolution for this client type.
Variables ¶
This section is empty.
Functions ¶
func ProtoResponse ¶
func ProtoResponse(notifs ...client.Notification) (*gpb.SubscribeResponse, error)
ProtoResponse converts client library Notification types into gNMI SubscribeResponse proto. An error is returned if any notifications have invalid paths or if update values can't be converted to gpb.TypedValue.
Types ¶
type Client ¶
type Client struct { Rd Record // contains filtered or unexported fields }
Client handles execution of the query and caching of its results.
func NewFromConn ¶
func NewFromConn(ctx context.Context, conn *grpc.ClientConn, d client.Destination) (*Client, error)
NewFromConn creates and returns the client based on the provided transport.
func NewStatsClient ¶
New returns a new initialized client. If error is nil, returned Client has established a connection to d. Close needs to be called for cleanup.
func (*Client) Close ¶
Close forcefully closes the underlying connection, terminating the query right away. It's safe to call Close multiple times.
func (*Client) Peer ¶
Peer returns the peer of the current stream. If the client is not created or if the peer is not valid nil is returned.