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

Method IncrByFloat

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

Source from the content-addressed store, hash-verified

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)
213 if err != nil {
214 return &gstring.IncrByFloatResponse{Ok: true}, err
215 }
216 return &gstring.IncrByFloatResponse{Ok: true}, nil
217}
218
219func (s *str) Decr(ctx context.Context, req *gstring.DecrRequest) (*gstring.DecrResponse, error) {
220 err := s.dbs.Decr(req.Key, req.Expire*1000)

Callers

nothing calls this directly

Calls 1

IncrByFloatMethod · 0.65

Tested by

no test coverage detected