testredis

package
v1.62.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package testredis is package for starting a redis test server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server interface {
	Addr() string
	Close() error
	// FastForward is a function for enforce the TTL of keys in
	// implementations what they have not exercise the expiration by themselves
	// (e.g. Minitredis). This method is a no-op in implementations which support
	// the expiration as usual.
	//
	// All the keys whose TTL minus d become <= 0 will be removed.
	FastForward(d time.Duration)
}

Server represents a redis server.

func Mini

func Mini(ctx context.Context) (Server, error)

Mini starts miniredis server.

func Process

func Process(ctx context.Context) (Server, error)

Process starts a redis-server test process.

func Start

func Start(ctx context.Context) (Server, error)

Start starts a redis-server when available, otherwise falls back to miniredis.

Jump to

Keyboard shortcuts

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