ws

package
v1.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, ws wsConnection, service GraphQLService, options ...func(conn *connection)) func()

Connect implements the apollographql subscriptions-transport-ws protocol@v0.9.4 https://github.com/apollographql/subscriptions-transport-ws/blob/v0.9.4/PROTOCOL.md

func NewHandlerFunc

func NewHandlerFunc(svc GraphQLService, httpHandler http.Handler) http.HandlerFunc

NewHandlerFunc returns an http.HandlerFunc that supports GraphQL over websockets

func ReadLimit

func ReadLimit(limit int64) func(conn *connection)

ReadLimit limits the maximum size of incoming messages

func WriteTimeout

func WriteTimeout(d time.Duration) func(conn *connection)

WriteTimeout sets a timeout for outgoing messages

Types

type GraphQLService

type GraphQLService interface {
	Subscribe(ctx context.Context, document string, operationName string, variableValues map[string]interface{}) (payloads <-chan interface{}, err error)
}

GraphQLService interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL