api

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSource

func ParseSource(options *Options, source string) error

ParseSource parses options source string. Formats of source:

[network://]host:port?k1=v1&k2=v2&...&kn=vn

network should be tcp(default) or unix.

e.g.

127.0.0.1:26379
tcp://127.0.0.1:26379
tcp://127.0.0.1:26379?db=1&username=foo&password=123456

Types

type Options

type Options struct {
	redis.Options

	Prefix string
}

Options represents redis options

func NewClient

func NewClient(source string) (*redis.Client, *Options, error)

NewClient returns a redis client by options source string

Jump to

Keyboard shortcuts

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