testredis

package module
v0.0.0-...-a4ed715 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testredis provides an embedded Redis instance for unit testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis interface {
	// Addr gets the address of this Redis
	Addr() string

	// Client opens a new client to this Redis
	Client() *redis.Client

	// Start starts an unstarted Redis instance
	Start()

	// Close closes this Redis and associated resources
	Close() error
}

Redis is a testing Redis

func Open

func Open() (Redis, error)

Open opens a new test Redis

func OpenUnstarted

func OpenUnstarted() (Redis, error)

OpenUnstarted opens a new test Redis but not start it.

Jump to

Keyboard shortcuts

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