Documentation ¶
Overview ¶
Package subscribe implements the gnmi.proto Subscribe service API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Timeout specifies how long a send can be pending before the RPC is closed. Timeout = time.Minute // SubscriptionLimit specifies how many queries can be processing simultaneously. // This number includes Once queries, Polling subscriptions, and Streaming // subscriptions that have not yet synced. Once a streaming subscription has // synced, it no longer counts against the limit. A polling subscription // counts against the limit during each polling cycle while it is processed. SubscriptionLimit = 0 )
Functions ¶
func MakeSubscribeResponse ¶
func MakeSubscribeResponse(n interface{}, dup uint32) (*pb.SubscribeResponse, error)
MakeSubscribeResponse produces a gnmi_proto.SubscribeResponse from either client.Notification or gnmi_proto.Notification
This function modifies the message to set the duplicate count if it is greater than 0. The funciton clones the gnmi notification if the duplicate count needs to be set. You have to be working on a cloned message if you need to modify the message in any way.
Types ¶
type Server ¶
type Server struct { unimplemented.Server // Stub out all RPCs except Subscribe. // contains filtered or unexported fields }
Server is the implementation of the gNMI Subcribe API.
func NewServer ¶
NewServer instantiates server to handle client queries. The cache should be already instantiated.
Click to show internal directories.
Click to hide internal directories.