func (db *DB) PutRFMessage(m gears.RFMessage) error { if m.At == 0 { // Add the time in milliseconds since the epoch m.At = time.Now().UnixNano() / 1000000 } glog.V(2).Infof("Put: %d %+v", m.At, m) // Form the key key := genRFKey(m.At) // Write data err := db.Put(key, m) if err != nil { return err } // Publish to subscribers db.RFPublish(m) return nil }