chore: add cacheCloser to cleanup all opened files (#18473)

This commit is contained in:
Steven Masley
2025-06-20 13:25:33 -05:00
committed by GitHub
parent 9b5d49967c
commit 556b095d0f
3 changed files with 79 additions and 16 deletions
+4
View File
@@ -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 {