diff options
-rw-r--r-- | internal/serving/disk/local/serving.go | 3 | ||||
-rw-r--r-- | internal/serving/disk/serving.go | 7 | ||||
-rw-r--r-- | internal/serving/disk/zip/serving.go | 3 |
3 files changed, 5 insertions, 8 deletions
diff --git a/internal/serving/disk/local/serving.go b/internal/serving/disk/local/serving.go index 2882a301..95aebd10 100644 --- a/internal/serving/disk/local/serving.go +++ b/internal/serving/disk/local/serving.go @@ -5,10 +5,9 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk" "gitlab.com/gitlab-org/gitlab-pages/internal/vfs" "gitlab.com/gitlab-org/gitlab-pages/internal/vfs/local" - "gitlab.com/gitlab-org/gitlab-pages/metrics" ) -var instance = disk.New(vfs.Instrumented(local.New("local")), metrics.VFSServingFileSize) +var instance = disk.New(vfs.Instrumented(local.New("local"))) // Instance returns a serving instance that is capable of reading files // from the disk diff --git a/internal/serving/disk/serving.go b/internal/serving/disk/serving.go index 312ed093..cb3f2187 100644 --- a/internal/serving/disk/serving.go +++ b/internal/serving/disk/serving.go @@ -3,11 +3,10 @@ package disk import ( "os" - "github.com/prometheus/client_golang/prometheus" - "gitlab.com/gitlab-org/gitlab-pages/internal/httperrors" "gitlab.com/gitlab-org/gitlab-pages/internal/serving" "gitlab.com/gitlab-org/gitlab-pages/internal/vfs" + "gitlab.com/gitlab-org/gitlab-pages/metrics" ) // Disk describes a disk access serving @@ -43,10 +42,10 @@ func (s *Disk) ServeNotFoundHTTP(h serving.Handler) { // New returns a serving instance that is capable of reading files // from the VFS -func New(vfs vfs.VFS, fileSizeMetric *prometheus.HistogramVec) serving.Serving { +func New(vfs vfs.VFS) serving.Serving { return &Disk{ reader: Reader{ - fileSizeMetric: fileSizeMetric, + fileSizeMetric: metrics.VFSServingFileSize, vfs: vfs, }, } diff --git a/internal/serving/disk/zip/serving.go b/internal/serving/disk/zip/serving.go index 63578379..e9a5f1fa 100644 --- a/internal/serving/disk/zip/serving.go +++ b/internal/serving/disk/zip/serving.go @@ -5,10 +5,9 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk" "gitlab.com/gitlab-org/gitlab-pages/internal/vfs" "gitlab.com/gitlab-org/gitlab-pages/internal/vfs/zip" - "gitlab.com/gitlab-org/gitlab-pages/metrics" ) -var instance = disk.New(vfs.Instrumented(zip.New("zip")), metrics.VFSServingFileSize) +var instance = disk.New(vfs.Instrumented(zip.New("zip"))) // Instance returns a serving instance that is capable of reading files // from a zip archives opened from a URL, most likely stored in object storage |