System manages objects and handles to those objects
| 38 | |
| 39 | // System manages objects and handles to those objects |
| 40 | type System struct { |
| 41 | p Params |
| 42 | root volume |
| 43 | |
| 44 | // mu guards the volumes, queues, and txns. |
| 45 | // pure handle operations like Drop, KeepAlive, Inspect, etc. do not require this lock. |
| 46 | // mu should always be taken for a superset of the time that the handle system's lock is taken. |
| 47 | mu sync.RWMutex |
| 48 | volumes map[blobcache.OID]volume |
| 49 | queues map[blobcache.OID]queue |
| 50 | txns map[blobcache.OID]transaction |
| 51 | |
| 52 | handles handleSystem |
| 53 | setup singleflight.Group[blobcache.OID, AnyObject] |
| 54 | hub hub |
| 55 | } |
| 56 | |
| 57 | type AnyObject interface { |
| 58 | Down(ctx context.Context) error |
nothing calls this directly
no outgoing calls
no test coverage detected