MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / DecrBy

Method DecrBy

engine/grpc/service/string.go:227–233  ·  view source on GitHub ↗
(ctx context.Context, req *gstring.DecrByRequest)

Source from the content-addressed store, hash-verified

225}
226
227func (s *str) DecrBy(ctx context.Context, req *gstring.DecrByRequest) (*gstring.DecrByResponse, error) {
228 err := s.dbs.DecrBy(req.Key, int(req.Amount), req.Expire*1000)
229 if err != nil {
230 return &gstring.DecrByResponse{}, err
231 }
232 return &gstring.DecrByResponse{Ok: true}, nil
233}
234
235func (s *str) Exists(ctx context.Context, req *gstring.ExistsRequest) (*gstring.ExistsResponse, error) {
236 exists, err := s.dbs.Exists(req.Key)

Callers

nothing calls this directly

Calls 1

DecrByMethod · 0.65

Tested by

no test coverage detected