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

Function NewStorage

pkg/cache/redis/storage.go:30–61  ·  view source on GitHub ↗

NewStorage returns a new Redis-based storage.

(redisOptions *redis.Options, ns string)

Source from the content-addressed store, hash-verified

28
29// NewStorage returns a new Redis-based storage.
30func NewStorage(redisOptions *redis.Options, ns string) *Storage {
31 c := redis.NewClient(redisOptions)
32 return &Storage{
33 client: c,
34 namespacePrefix: ns,
35
36 ConfigStorage: ConfigStorage{
37 client: c,
38 namespacePrefix: ns,
39 },
40 IndexStorage: IndexStorage{
41 client: c,
42 namespacePrefix: ns,
43 },
44 ObjectStorage: ObjectStorage{
45 client: c,
46 namespacePrefix: ns,
47 },
48 ModuleStorage: ModuleStorage{
49 client: c,
50 namespacePrefix: ns,
51 },
52 ShallowStorage: ShallowStorage{
53 client: c,
54 namespacePrefix: ns,
55 },
56 ReferenceStorage: ReferenceStorage{
57 client: c,
58 namespacePrefix: ns,
59 },
60 }
61}
62
63var errNotSupported = fmt.Errorf("not supported")
64

Callers 1

ModuleMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected