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

Method IncrBy

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

Source from the content-addressed store, hash-verified

201}
202
203func (s *str) IncrBy(ctx context.Context, req *gstring.IncrByRequest) (*gstring.IncrByResponse, error) {
204 err := s.dbs.IncrBy(req.Key, int(req.Amount), req.Expire*1000)
205 if err != nil {
206 return &gstring.IncrByResponse{}, err
207 }
208 return &gstring.IncrByResponse{Ok: true}, nil
209}
210
211func (s *str) IncrByFloat(ctx context.Context, req *gstring.IncrByFloatRequest) (*gstring.IncrByFloatResponse, error) {
212 err := s.dbs.IncrByFloat(req.Key, req.Amount, req.Expire*1000)

Callers

nothing calls this directly

Calls 1

IncrByMethod · 0.65

Tested by

no test coverage detected