package
0.0.0-20240819164739-f47aed85de5a
Repository: https://github.com/unix-world/smartgo.git
Documentation: pkg.go.dev

# Functions

Bool is a helper that converts a command reply to a boolean.
Bytes is a helper that converts a command reply to a slice of bytes.
ByteSlices is a helper that converts an array command reply to a [][]byte.
Dial connects to the Redis server at the given network and address using the specified options.
DialClientName specifies a client name to be used by the Redis server connection.
DialConnectTimeout specifies the timeout for connecting to the Redis server when no DialNetDial option is specified.
DialContext connects to the Redis server at the given network and address using the specified options and context.
DialContextFunc specifies a custom dial function with context for creating TCP connections, otherwise a net.Dialer customized via the other options is used.
DialDatabase specifies the database to select when dialing a connection.
DialKeepAlive specifies the keep-alive period for TCP connections to the Redis server when no DialNetDial option is specified.
DialNetDial specifies a custom dial function for creating TCP connections, otherwise a net.Dialer customized via the other options is used.
DialPassword specifies the password to use when connecting to the Redis server.
DialReadTimeout specifies the timeout for reading a single command reply.
DialTimeout acts like Dial but takes timeouts for establishing the connection to the server, writing a command and reading a reply.
DialTLSConfig specifies the config to use when a TLS connection is dialed.
DialTLSHandshakeTimeout specifies the maximum amount of time waiting to wait for a TLS handshake.
DialTLSSkipVerify disables server name verification when connecting over TLS.
DialURL wraps DialURLContext using context.Background.
DialURLContext connects to a Redis server at the given URL using the Redis URI scheme.
DialUsername specifies the username to use when connecting to the Redis server when Redis ACLs are used.
DialUseTLS specifies whether TLS should be used when connecting to the server.
DialWriteTimeout specifies the timeout for writing a single command.
DoContext sends a command to server and returns the received reply.
DoWithTimeout executes a Redis command with the specified read timeout.
Float64 is a helper that converts a command reply to 64 bit float.
Float64Map is a helper that converts an array of strings (alternating key, value) into a map[string]float64.
Float64s is a helper that converts an array command reply to a []float64.
Int is a helper that converts a command reply to an integer.
Int64 is a helper that converts a command reply to 64 bit integer.
Int64Map is a helper that converts an array of strings (alternating key, value) into a map[string]int64.
Int64s is a helper that converts an array command reply to a []int64.
IntMap is a helper that converts an array of strings (alternating key, value) into a map[string]int.
Ints is a helper that converts an array command reply to a []int.
Latencies is a helper that parses the LATENCY LATEST command output and return the slice of Latency values.
LatencyHistories is a helper that parse the LATENCY HISTORY command output and returns a LatencyHistory slice.
MultiBulk is a helper that converts an array command reply to a []interface{}.
NewConn returns a new Redigo connection for the given net connection.
NewLoggingConn returns a logging wrapper around a connection.
NewLoggingConnFilter returns a logging wrapper around a connection and a filter function.
NewPool creates a new pool.
NewScript returns a new script object.
Positions is a helper that converts an array of positions (lat, long) into a [][2]float64.
ReceiveContext receives a single reply from the Redis server.
ReceiveWithTimeout receives a reply with the specified read timeout.
Scan copies from src to the values pointed at by dest.
ScanSlice scans src to the slice pointed to by dest.
ScanStruct scans alternating names and values from src to a struct.
SlowLogs is a helper that parse the SLOWLOG GET command output and return the array of SlowLog.
String is a helper that converts a command reply to a string.
StringMap is a helper that converts an array of strings (alternating key, value) into a map[string]string.
Strings is a helper that converts an array command reply to a []string.
Uint64 is a helper that converts a command reply to 64 bit unsigned integer.
Uint64Map is a helper that converts an array of strings (alternating key, value) into a map[string]uint64.
Uint64s is a helper that converts an array command reply to a []uint64.
Values is a helper that converts an array command reply to a []interface{}.

# Variables

ErrNil indicates that a reply value is nil.
ErrPoolExhausted is returned from a pool connection method (Do, Send, Receive, Flush, Err) when the maximum number of database connections in the pool has been reached.

# Structs

DialOption specifies an option for dialing a Redis server.
Latency represents a redis LATENCY LATEST.
LatencyHistory represents a redis LATENCY HISTORY.
Message represents a message notification.
Pong represents a pubsub pong notification.
Pool maintains a pool of connections.
PoolStats contains pool statistics.
PubSubConn wraps a Conn with convenience methods for subscribers.
Script encapsulates the source, hash and key count for a Lua script.
SlowLog represents a redis SlowLog.
Subscription represents a subscribe or unsubscribe notification.

# Interfaces

Argument is the interface implemented by an object which wants to control how the object is converted to Redis bulk strings.
Conn represents a connection to a Redis server.
ConnWithContext is an optional interface that allows the caller to control the command's life with context.
ConnWithTimeout is an optional interface that allows the caller to override a connection's default read timeout.
Scanner is implemented by an object which wants to control its value is interpreted when read from Redis.

# Type aliases

Args is a helper for constructing command arguments from structured values.
Error represents an error returned in a command reply.