handlers

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STRING  = "string"
	LIST    = "list"
	SET     = "set"
	INTEGER = "integer"
)
View Source
const (
	NX      = "NX"
	XX      = "XX"
	KEEPTTL = "KEEPTTL"
	GET     = "GET"
	EX      = "EX"
	PX      = "PX"
	EXAT    = "EXAT"
	PXAT    = "PXAT"
	LT      = "LT"
	GT      = "GT"
	REPLACE = "REPLACE"
)

Variables

View Source
var Handlers = map[string]Handler{
	"AUTH":        auth,
	"EXISTS":      exists,
	"SET":         set,
	"GET":         get,
	"DEL":         del,
	"COPY":        copy,
	"LPUSH":       lpush,
	"LPUSHX":      lpush,
	"LPOP":        lpop,
	"RPUSH":       rpush,
	"RPUSHX":      rpush,
	"RPOP":        rpop,
	"LLEN":        llen,
	"LINDEX":      lindex,
	"SADD":        sadd,
	"SMEMBERS":    smembers,
	"SISMEMBER":   sismember,
	"PERSIST":     persist,
	"EXPIRE":      setExpiry,
	"EXPIREAT":    setExpiry,
	"PEXPIRE":     setExpiry,
	"PEXPIREAT":   setExpiry,
	"EXPIRETIME":  expiretime,
	"SUBSCRIBE":   subscribe,
	"PUBLISH":     publish,
	"UNSUBSCRIBE": unsubscribe,
}

Functions

func HandleRespValue

func HandleRespValue(v resp.RespValue, conn *connection.Connection, store storage.Store, config configuration.Config) resp.RespValue

Types

type Handler

type Handler func(handlerArgs) handlerResponse

Jump to

Keyboard shortcuts

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