tinyredis

package
v1.0.68 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tinyredis provides utilities for handling Redis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial added in v1.0.15

func Dial(url string, config ...*Config) (*redis.Client, error)

Dial creates a connection to Redis and returns *redis.Client instance.

Types

type Config

type Config struct {
	// ConnectionTimeout is a maximum time client should spend trying to connect (default: 5s).
	ConnectionTimeout time.Duration

	// NoPing indicates whether Dial should skip the initial call to Ping method (default: false).
	NoPing bool

	// RedisOpt allows to specify a function that operates directly on *redis.Options.
	RedisOpt func(*redis.Options)
}

Config holds a configuration for Dial call.

Jump to

Keyboard shortcuts

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