1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-14 17:02:43 +00:00
cloudkeys-go/vendor/github.com/xuyu/goredis/connection.go

18 lines
420 B
Go
Raw Normal View History

2015-07-30 15:43:22 +00:00
package goredis
// Echo command returns message.
func (r *Redis) Echo(message string) (string, error) {
rp, err := r.ExecuteCommand("ECHO", message)
if err != nil {
return "", err
}
return rp.StringValue()
}
// Ping command returns PONG.
// This command is often used to test if a connection is still alive, or to measure latency.
func (r *Redis) Ping() error {
_, err := r.ExecuteCommand("PING")
return err
}