Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains information about a subscribe client that has connected to the server.
func (*Client) Close ¶
func (c *Client) Close()
Closing of client queue is triggered upon end of stream receive or stream error or fatal error of any client go routine . it will cause cancle of client context and exit of the send goroutines.
func (*Client) Run ¶
func (c *Client) Run(srv *Server, stream spb.GNMIDialOut_PublishServer) (err error)
Run process streaming from publish client. The first message received must be a SubscriptionList. Once the client is started, it will run until the stream is closed or the schedule completes. For Poll queries the Run will block internally after sync until a Poll request is made to the server.
type Config ¶
type Config struct { // Port for the Server to listen on. If 0 or unset the Server will pick a port // for this Server. Port int64 }
Config is a collection of values for Server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server manages a single GNMIDialOut_PublishServer implementation. Each client that connects via PublistRequest sends subscribeResponse to the server.
func NewServer ¶
func NewServer(config *Config, opts []grpc.ServerOption) (*Server, error)
New returns an initialized Server.
func (*Server) Publish ¶
func (srv *Server) Publish(stream spb.GNMIDialOut_PublishServer) error
Publish implements the GNMI DialOut Publish RPC.
func (*Server) SetDataStore ¶
func (srv *Server) SetDataStore(dataStore interface{})
Port returns the port the Server is listening to.