connection

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

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 ...Option) 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

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

type Option added in v0.0.2

type Option func(conn *connection)

func ReadLimit

func ReadLimit(limit int64) Option

ReadLimit limits the maximum size of incoming messages

func WriteTimeout

func WriteTimeout(d time.Duration) Option

WriteTimeout sets a timeout for outgoing messages

Jump to

Keyboard shortcuts

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