handlers

package
v0.0.0-...-f5fc736 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionOpen = iota
	TransactionInner
	TransactionClose
)

Variables

View Source
var TransactionCommands = map[string]int{

	"DISCARD": TransactionClose,
	"EXEC":    TransactionClose,
	"MULTI":   TransactionOpen,
	"UNWATCH": TransactionInner,
	"WATCH":   TransactionOpen,
}
View Source
var UnsupportedCommands = map[string]bool{

	"BLPOP":      true,
	"BRPOP":      true,
	"BZPOPMAX":   true,
	"BZPOPMIN":   true,
	"XREAD":      true,
	"XREADGROUP": true,
	"WAIT":       true,

	"AUTH":   true,
	"SELECT": true,
}

Functions

func CommandConnection

func CommandConnection(log *zap.Logger, sd *statsd.Client, conn net.Conn, address string, readTimeout, writeTimeout time.Duration, id uint64, server *pool.Server, kill chan interface{}, quit chan interface{}, interceptor MessageInterceptor, reservations *Reservations)

Types

type MessageInterceptor

type MessageInterceptor func(incomingCmds []string, m []*redis.Message)

type Reservations

type Reservations struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewReservations

func NewReservations(maxSub, maxBlk int, sd *statsd.Client) *Reservations

func (*Reservations) Close

func (r *Reservations) Close()

Jump to

Keyboard shortcuts

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