Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PGComm ¶ added in v0.0.11
type PGComm struct {
pb.UnimplementedPGServiceServer
// Signal that all streaming API calls should stop
StopAllStreaming chan bool
// contains filtered or unexported fields
}
Implementation of the PGServer
func (*PGComm) AcceptStreamingAPICall ¶ added in v1.0.0
func (pgc *PGComm) AcceptStreamingAPICall() (*StreamingAPICall, error)
Blocks until a client connects or the server stops. Returns a StreamingAPICall for the new client, or an error if the server has stopped.
func (*PGComm) StartServing ¶ added in v0.0.11
Starts serving for gRPC calls at specified address and port.
func (*PGComm) StopServing ¶ added in v0.0.11
func (pgc *PGComm) StopServing()
Stops serving of gRPC calls.
func (*PGComm) StreamUpdates ¶ added in v0.0.11
Implementation of PGServer.StreamUpdates API call.
This function is invoked from a Go routine for each client that connects.
type StreamingAPICall ¶ added in v1.0.0
type StreamingAPICall struct {
// Streaming data coming from the client App
Inbound chan []byte
// Streaming data going to the client App
Outbound chan []byte
// Signals that API call has exited
CallHasExited chan byte
}
StreamingAPICall represents a single client streaming API call with channels for communication.
Click to show internal directories.
Click to hide internal directories.