subscription

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NormalClosure                   = 1000
	ConnectionInitialisationTimeout = 4408
	TooManyInitialisationRequests   = 4429
	SubscriberAlreadyExists         = 4409
	Unauthorized                    = 4401
	InvalidMessage                  = 4400
)
View Source
const (
	ConnectionInit = "connection_init"
	ConnectionAck  = "connection_ack"
	Ping           = "ping"
	Pong           = "pong"
	Subscribe      = "subscribe"
	Next           = "next"
	Error          = "error"
	Complete       = "complete"
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(config Config) *handler

Types

type Config

type Config struct {
	Schema                    graphql.Schema
	Origins                   []string
	ConnectionInitWaitTimeout time.Duration
	PingInterval              time.Duration
}

type ConnectionMessage

type ConnectionMessage struct {
	Type    string                 `json:"type"`
	Id      string                 `json:"id,omitempty"`
	Payload map[string]interface{} `json:"payload,omitempty"`
}

Jump to

Keyboard shortcuts

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