MCPcopy Index your code
hub / github.com/coder/coder / CacheCloser

Struct CacheCloser

coderd/files/closer.go:15–20  ·  view source on GitHub ↗

CacheCloser is a cache wrapper used to close all acquired files. This is a more simple interface to use if opening multiple files at once.

Source from the content-addressed store, hash-verified

13// CacheCloser is a cache wrapper used to close all acquired files.
14// This is a more simple interface to use if opening multiple files at once.
15type CacheCloser struct {
16 cache FileAcquirer
17
18 closers []func()
19 mu sync.Mutex
20}
21
22func NewCacheCloser(cache FileAcquirer) *CacheCloser {
23 return &CacheCloser{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected