MCPcopy
hub / github.com/dropbox/godropbox / GenericStorage

Struct GenericStorage

caching/generic_storage.go:41–55  ·  view source on GitHub ↗

A generic storage implementation. The functionalities are provided by the user through GenericStorageOptions.

Source from the content-addressed store, hash-verified

39// A generic storage implementation. The functionalities are provided by the
40// user through GenericStorageOptions.
41type GenericStorage struct {
42 name string
43
44 rwMutex sync.RWMutex
45
46 get func(key interface{}) (interface{}, error)
47 getMulti func(keys ...interface{}) ([]interface{}, error)
48 set func(item interface{}) error
49 setMulti func(items ...interface{}) error
50 del func(key interface{}) error
51 delMulti func(keys ...interface{}) error
52
53 errorOnFlush bool
54 flush func() error
55}
56
57// This creates a GenericStorage. See GenericStorageOptions for additional
58// information.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected