feat: add maximum image dimension to be processed by the thumbnailer (#9035)

* feat: add maximum image dimension to be processed by the thumbnailer

* chore: make golangci-lint happy
This commit is contained in:
Thomas Müller
2024-05-03 12:20:27 +02:00
committed by GitHub
parent a1e4da239f
commit 9db3fd028e
31 changed files with 219 additions and 244 deletions
@@ -27,8 +27,8 @@ func Server(opts ...Option) (*http.Server, error) {
}
// health implements the health check.
func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
func health(_ *config.Config) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(http.StatusOK)
@@ -43,8 +43,8 @@ func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
}
// ready implements the ready check.
func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
func ready(_ *config.Config) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(http.StatusOK)
@@ -8,6 +8,7 @@ import (
"github.com/owncloud/ocis/v2/services/thumbnails/pkg/metrics"
"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/noop"
)
// Option defines a single option function.
@@ -76,7 +77,7 @@ func TraceProvider(traceProvider trace.TracerProvider) Option {
if traceProvider != nil {
o.TraceProvider = traceProvider
} else {
o.TraceProvider = trace.NewNoopTracerProvider()
o.TraceProvider = noop.NewTracerProvider()
}
}
}