redis

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConnectionContextKey is the key for keeping the connection reference on
	// the context.
	ConnectionContextKey graphqlWSContextKey = "connection"

	// SubscriptionContextKey is the key for keeping the subscription reference
	// on the context.
	SubscriptionContextKey graphqlWSContextKey = "subscription"
)

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	Dial() (redis.Conn, error)
}

Dialer is responsible for creating new redis connections.

As connections are being used for subscriptions, it won't be pooled.

func NewDialer

func NewDialer(protocol, address string, options ...redis.DialOption) Dialer

NewDialer dials for a new connection. It will return the default implementation of the `Dialer` interface.

type SubscriptionHandler

type SubscriptionHandler interface {
	graphqlws.SubscriptionStartHandler
	graphqlws.SubscriptionStopHandler
	graphqlws.WebsocketCloseHandler
}

func NewSubscriptionHandler

func NewSubscriptionHandler(conn *graphqlws.Conn, dialer Dialer) SubscriptionHandler

NewSubscriptionHandler returns a new instance of a `SubscriptionHandler` that will add the logic for registering

Jump to

Keyboard shortcuts

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