diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2022-07-12 07:39:53 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2022-07-12 07:39:53 +0300 |
commit | 8dd16c9c043d08617a1d01d46880d7506a299ba2 (patch) | |
tree | 65537d02c52e4be9518e4ca6ebf87001ec94b076 /internal/vfs/root.go | |
parent | 1f9cc507928429fc0a85eaa504bfca692c56ff2a (diff) | |
parent | 57195a5ae472878c19dae4b6a65bc37a76e992e4 (diff) |
Merge branch 'perf/lazy-open-serve' into 'master'revert-perf-lazy-open-master
perf: open files lazily when serving content
See merge request gitlab-org/gitlab-pages!803
Diffstat (limited to 'internal/vfs/root.go')
-rw-r--r-- | internal/vfs/root.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/vfs/root.go b/internal/vfs/root.go index 9c7528b3..1a2e9ccd 100644 --- a/internal/vfs/root.go +++ b/internal/vfs/root.go @@ -16,6 +16,7 @@ type Root interface { Lstat(ctx context.Context, name string) (os.FileInfo, error) Readlink(ctx context.Context, name string) (string, error) Open(ctx context.Context, name string) (File, error) + IsCompressed(name string) (bool, error) } type instrumentedRoot struct { @@ -68,3 +69,7 @@ func (i *instrumentedRoot) Open(ctx context.Context, name string) (File, error) return f, err } + +func (i *instrumentedRoot) IsCompressed(name string) (bool, error) { + return i.root.IsCompressed(name) +} |