fakememcached

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package fakememcached is a tiny text-protocol fake memcached server for middleware store-adapter tests. Not for production use.

Implemented commands: get, gets, set, add, delete, cas, version, quit. Missing: replace, append/prepend, incr/decr, flush_all — not used by any of the bundled middleware-store adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is an in-process fake memcached text-protocol server bound to a random loopback port.

func Start

func Start(tb testing.TB) *Server

Start spins up a fake memcached on a random loopback port. The listener is closed via t.Cleanup.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns "host:port".

func (*Server) Data

func (s *Server) Data() map[string]string

Data returns a copy of current key→value entries (ignoring expiry).

Jump to

Keyboard shortcuts

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