mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add cacheCloser to cleanup all opened files (#18473)
This commit is contained in:
@@ -19,6 +19,10 @@ import (
|
||||
"github.com/coder/coder/v2/coderd/util/lazy"
|
||||
)
|
||||
|
||||
type FileAcquirer interface {
|
||||
Acquire(ctx context.Context, fileID uuid.UUID) (*CloseFS, error)
|
||||
}
|
||||
|
||||
// NewFromStore returns a file cache that will fetch files from the provided
|
||||
// database.
|
||||
func NewFromStore(store database.Store, registerer prometheus.Registerer, authz rbac.Authorizer) *Cache {
|
||||
|
||||
Reference in New Issue
Block a user