func (d *dataAccess) LoadLastInfos() (map[string]map[string]*LastInfo, error) { conn := d.Get() defer conn.Close() b, err := redis.Bytes(conn.Do("GET", "search:last")) if err != nil { return nil, slog.Wrap(err) } var m map[string]map[string]*LastInfo err = util.UnmarshalGzipJson(b, &m) if err != nil { return nil, slog.Wrap(err) } return m, nil }
func (d *dataAccess) LoadLastInfos() (map[string]map[string]*LastInfo, error) { defer collect.StartTimer("redis", opentsdb.TagSet{"op": "LoadLast"})() conn := d.GetConnection() defer conn.Close() b, err := redis.Bytes(conn.Do("GET", "search:last")) if err != nil { return nil, slog.Wrap(err) } var m map[string]map[string]*LastInfo err = util.UnmarshalGzipJson(b, &m) if err != nil { return nil, slog.Wrap(err) } return m, nil }