// Recover requeue a beat entry with RPUSH
Recover requeue a beat entry with RPUSH
// Recover requeue a beat entry with RPUSH
func (b *Redis) Recover(r xlog.RecordConvertible) (err error) {
	var be BeatEvent
	var ok bool
	if be, ok = r.(BeatEvent); !ok {
		err = errors.New("not a BeatEvent")
		return
	}
	var buf []byte
	if buf, err = json.Marshal(be); err != nil {
		return
	}
	_, err = b.Client.RPush(b.Key, string(buf)).Result()
	return
}
func ( b * Redis ) Recover ( r xlog . RecordConvertible ) ( err error ) { var be BeatEvent var ok bool if be , ok = r . ( BeatEvent ) ; ! ok { err = errors . New ( " " ) return } var buf [ ] byte if buf , err = json . Marshal ( be ) ; err != nil { return } _ , err = b . Client . RPush ( b . Key , string ( buf ) ) . Result ( ) return }
Recover requeue a beat entry with RPUSH
Recover requeue a beat entry with RPUSH
// check if it's a BeatEvent // marshal JSON // RPUSH