Help us shape the future of Go! Take the 2026 Go Developer Survey

redis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNil = errors.New("redis: nil")

ErrNil indicates a nil Redis response (missing key).

Functions

This section is empty.

Types

type Client

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

Client executes Redis commands with per-call connections.

func New

func New(options Options) *Client

New creates a Redis client with defaults.

func (*Client) Do

func (c *Client) Do(args ...string) (any, error)

Do executes a Redis command.

func (*Client) DoContext

func (c *Client) DoContext(ctx context.Context, args ...string) (any, error)

DoContext executes a Redis command with context.

type Options

type Options struct {
	Network      string
	Address      string
	Username     string
	Password     string
	DB           int
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Options configures Redis connections.

Jump to

Keyboard shortcuts

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