golib: github.com/levenlabs/golib/radixutil Index | Files

package radixutil

import "github.com/levenlabs/golib/radixutil"

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

Index

Package Files

radixutil.go

func DialMaybeCluster Uses

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 Uses

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

Package radixutil imports 6 packages (graph) and is imported by 4 packages. Updated 2017-03-04. Refresh now. Tools for package owners.