redisserver

package
v1.25.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package redisserver 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 added in v0.33.2

type Server interface {
	Addr() string
	Close() error
	// TestingFastForward 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.
	TestingFastForward(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