redis

package
v0.0.0-...-ef86c35 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(s State, b []byte) (any, error)

func Serialize

func Serialize(m any, opts *SerDeOpts) (string, error)

func SerializeArray

func SerializeArray(m []any, opts *SerDeOpts) (string, error)

func SerializeBigNumber

func SerializeBigNumber(m any, opts *SerDeOpts) (string, error)

func SerializeBoolean

func SerializeBoolean(m bool, opts *SerDeOpts) (string, error)

func SerializeBulkError

func SerializeBulkError(m error, opts *SerDeOpts) (string, error)

func SerializeBulkString

func SerializeBulkString(m string, opts *SerDeOpts) (string, error)

func SerializeDouble

func SerializeDouble(m float64, opts *SerDeOpts) (string, error)

func SerializeError

func SerializeError(m error, opts *SerDeOpts) (string, error)

func SerializeInt

func SerializeInt(m int64, opts *SerDeOpts) (string, error)

func SerializeMap

func SerializeMap(m map[string]any, opts *SerDeOpts) (string, error)

func SerializeNull

func SerializeNull(opts *SerDeOpts) (string, error)

func SerializeSimpleError

func SerializeSimpleError(err error, opts *SerDeOpts) (string, error)

func SerializeSimpleString

func SerializeSimpleString(m string, opts *SerDeOpts) (string, error)

func SerializeString

func SerializeString(m string, opts *SerDeOpts) (string, error)

func SerializeVerbatimString

func SerializeVerbatimString(m string, opts *SerDeOpts) (string, error)

Types

type Command

type Command func(State, ...any) (any, error)

type SerDeOpts

type SerDeOpts map[string]string

type Server

type Server struct {
	Transport transport.Transport
	// contains filtered or unexported fields
}

func NewServer

func NewServer(addr string) *Server

func (*Server) HandleMessage

func (s *Server) HandleMessage(m transport.Message) error

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

type State

type State struct {
	// contains filtered or unexported fields
}

func NewState

func NewState() State

func (State) Data

func (s State) Data() *map[string]*stateValue

Jump to

Keyboard shortcuts

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