MCPcopy Create free account
hub / github.com/bricks-cloud/BricksLLM / GetCounter

Method GetCounter

internal/storage/redis/storage.go:38–53  ·  view source on GitHub ↗
(keyId string)

Source from the content-addressed store, hash-verified

36}
37
38func (s *Store) GetCounter(keyId string) (int64, error) {
39 ctxTimeout, cancel := context.WithTimeout(context.Background(), s.rt)
40 defer cancel()
41
42 val := s.client.Get(ctxTimeout, keyId)
43 result, err := val.Int64()
44 if err == nil {
45 return result, nil
46 }
47
48 if err == redis.Nil {
49 return 0, nil
50 }
51
52 return 0, err
53}

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected