gqlwsserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSubscriptionStopSig

func GetSubscriptionStopSig(ctx context.Context) chan interface{}

Types

type Config

type Config struct {
	Response http.ResponseWriter
	Request  *http.Request
	Schema   *graphql.Schema

	GraceClosePeriod, ConnectionInitTimeout time.Duration

	OnConnectionInit, OnPing func(*gqlwsmessage.Message) gqlwsmessage.Payload
	OnPong                   func(*gqlwsmessage.Message)
	// Context is passed to resolvers. can be used to pass context-related values
	Context context.Context
}

type ConnectionParams

type ConnectionParams interface{}

func GetConnectionParams

func GetConnectionParams(ctx context.Context) ConnectionParams

type Socket

type Socket struct {
	*Config
	// contains filtered or unexported fields
}

func NewSocket

func NewSocket(cfg *Config) *Socket

func (*Socket) Close

func (sock *Socket) Close()

func (*Socket) Error

func (sock *Socket) Error() error

func (*Socket) Wait

func (sock *Socket) Wait()

Jump to

Keyboard shortcuts

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