Documentation ¶
Overview ¶
Package http handles GraphQL HTTP Requests including WebSocket Upgrades.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleWebsocket ¶
func HandleWebsocket(done chan bool, errChan chan error, conn net.Conn, executorPool subscription.ExecutorPool, logger abstractlogger.Logger)
func NewGraphqlHTTPHandler ¶
Types ¶
type GraphQLHTTPRequestHandler ¶
type GraphQLHTTPRequestHandler struct {
// contains filtered or unexported fields
}
func (*GraphQLHTTPRequestHandler) ServeHTTP ¶
func (g *GraphQLHTTPRequestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type WebsocketSubscriptionClient ¶
type WebsocketSubscriptionClient struct {
// contains filtered or unexported fields
}
WebsocketSubscriptionClient is an actual implementation of the subscription client interface.
func NewWebsocketSubscriptionClient ¶
func NewWebsocketSubscriptionClient(logger abstractlogger.Logger, clientConn net.Conn) *WebsocketSubscriptionClient
NewWebsocketSubscriptionClient will create a new websocket subscription client.
func (*WebsocketSubscriptionClient) Disconnect ¶
func (w *WebsocketSubscriptionClient) Disconnect() error
Disconnect will close the websocket connection.
func (*WebsocketSubscriptionClient) IsConnected ¶
func (w *WebsocketSubscriptionClient) IsConnected() bool
IsConnected will indicate if the websocket connection is still established.
func (*WebsocketSubscriptionClient) ReadFromClient ¶
func (w *WebsocketSubscriptionClient) ReadFromClient() (message *subscription.Message, err error)
ReadFromClient will read a subscription message from the websocket client.
func (*WebsocketSubscriptionClient) WriteToClient ¶
func (w *WebsocketSubscriptionClient) WriteToClient(message subscription.Message) error
WriteToClient will write a subscription message to the websocket client.
Click to show internal directories.
Click to hide internal directories.