Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var PathCacheSize uint32 = 100
PathCacheSize determines how large the shared client-server path cache should be.
var ResultBufferSize uint32 = 50
ResultBufferSize determines how large the buffer for outgoing results should be.
Functions ¶
This section is empty.
Types ¶
type RootResolver ¶
RootResolver is the root resolver call.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves sessions with clients. Clients keep a query tree in sync with the server.
func (*Server) BuildSession ¶
func (s *Server) BuildSession(ctx context.Context, sendCh ServerSendChan, rootRes RootResolver) *Session
BuildSession builds a new session.
type ServerSendChan ¶
type ServerSendChan chan<- *proto.RGQLServerMessage
ServerSendChan is a channel used to send updates to a remote client. This should be sufficiently buffered, as internally resolver processing will halt until new messages are writable to the channel (after an internal buffer fills). The server will close this channel when it disposes the client instance for any reason.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a client session container.
func NewSession ¶
func NewSession(ctx context.Context, server *Server, sendCh ServerSendChan, rootRes RootResolver) *Session
NewSession builds a new session.
func (*Session) HandleMessage ¶
func (s *Session) HandleMessage(msg *proto.RGQLClientMessage)
HandleMessage instructs the server to handle a message from a remote client.