func (r *clientRPC) Put(req *api.Request) *api.Response { var res api.Response err := r.s.Put(req.Key, req.Value, &libkvstore.WriteOptions{TTL: req.TTL}) if err != nil { res.Err = err.Error() } return &res }
func (r *clientRPC) Get(req *api.Request) *api.Response { var res api.Response kv, err := r.s.Get(req.Key) if err != nil { res.Err = err.Error() return &res } res.KV = libkvToKV(kv) return &res }