MCPcopy Create free account
hub / github.com/encoder-run/operator / Shallow

Method Shallow

pkg/cache/redis/shallow.go:33–48  ·  view source on GitHub ↗

Shallow retrieves the list of shallow commit hashes from Redis.

()

Source from the content-addressed store, hash-verified

31
32// Shallow retrieves the list of shallow commit hashes from Redis.
33func (s *ShallowStorage) Shallow() ([]plumbing.Hash, error) {
34 key := withNamespace(s.namespacePrefix, shallowPrefix, "")
35
36 // Fetch all members of the set.
37 members, err := s.client.SMembers(ctx, key).Result()
38 if err != nil {
39 return nil, err
40 }
41
42 var commits []plumbing.Hash
43 for _, member := range members {
44 commits = append(commits, plumbing.NewHash(member))
45 }
46
47 return commits, nil
48}

Callers

nothing calls this directly

Calls 1

withNamespaceFunction · 0.85

Tested by

no test coverage detected