A generic storage implementation. The functionalities are provided by the user through GenericStorageOptions.
| 39 | // A generic storage implementation. The functionalities are provided by the |
| 40 | // user through GenericStorageOptions. |
| 41 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected