redsrv

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package redsrv implements a Redis-compatible (RESP) server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugServer

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

DebugServer is a debug server with pprof endpoints.

func NewDebug

func NewDebug(host string, port int) *DebugServer

NewDebug creates a new debug server.

func (*DebugServer) Start

func (s *DebugServer) Start() error

Start starts the debug server.

func (*DebugServer) Stop

func (s *DebugServer) Stop() error

Stop stops the debug server.

type Server

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

A Redis-compatible Redka server that uses the RESP protocol. Works with a Redka database instance.

To start the server, call Server.Start method and wait for the ready channel to receive a nil value (success) or an error.

To stop the server, call Server.Stop method.

func New

func New(net string, addr string, db *redka.DB) *Server

New creates a new Redka server with the given network, address and database. Does not start the server.

func (*Server) Start

func (s *Server) Start(ready chan error) error

Start starts the server. If ready chan is not nil, sends a nil value when the server is ready to accept connections, or an error if it fails to start.

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the server and closes the database.

Directories

Path Synopsis
internal
command
Package command implements Redis-compatible commands for operations on data structures.
Package command implements Redis-compatible commands for operations on data structures.
parser
Package parser implements command arguments parsing.
Package parser implements command arguments parsing.
redis
Package redis implements basis for Redis-compatible commands in Redka.
Package redis implements basis for Redis-compatible commands in Redka.

Jump to

Keyboard shortcuts

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