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

Method Incr

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

Source from the content-addressed store, hash-verified

193}
194
195func (s *str) Incr(ctx context.Context, req *gstring.IncrRequest) (*gstring.IncrResponse, error) {
196 err := s.dbs.Incr(req.Key, req.Expire*1000)
197 if err != nil {
198 return &gstring.IncrResponse{}, err
199 }
200 return &gstring.IncrResponse{Ok: true}, nil
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)

Callers

nothing calls this directly

Calls 1

IncrMethod · 0.65

Tested by

no test coverage detected