radixutil

package
v0.0.0-...-0f89747 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package radixutil provides various methods for working with the radix.v2 package, implenting various oft-used behaviors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialMaybeCluster

func DialMaybeCluster(network, addr string, poolSize int) (util.Cmder, error)

DialMaybeCluster will do discovery on the redis instance at the given address to determine if it is part of a cluster or not. If so a radix Cluster is returned, using the given poolSize, if not a normal radix Pool is returned just for the given address.

func SRVDialFunc

func SRVDialFunc(sc *srvclient.SRVClient, timeout time.Duration) func(string, string) (*redis.Client, error)

SRVDialFunc can be used as a DialFunc for various radix packages. It takes in an address, and will perform a MaybeSRV on it before actually making the connection. The given timeout will be used as the read/write timeout on the new connection. A timeout of 0 can be passed in to use whatever the default is on the system

Types

This section is empty.

Jump to

Keyboard shortcuts

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