api

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 4 Imported by: 0

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