MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / NewHandler

Function NewHandler

logger/handler.go:67–73  ·  view source on GitHub ↗

NewHandler creates a new [Handler] instance.

(out io.Writer, config *Config)

Source from the content-addressed store, hash-verified

65
66// NewHandler creates a new [Handler] instance.
67func NewHandler(out io.Writer, config *Config) *Handler {
68 return &Handler{
69 out: out,
70 config: config,
71 mu: new(sync.Mutex),
72 }
73}
74
75// AddHook adds a new hook to the handler.
76func (h *Handler) AddHook(hook Hook) {

Callers 8

SetupTestMethod · 0.92
SetupTestMethod · 0.92
SetupTestMethod · 0.92
BenchmarkFormatterPrettyFunction · 0.92
BenchmarkFormatterJSONFunction · 0.92
initFunction · 0.85
InitFunction · 0.85

Calls

no outgoing calls

Tested by 6

SetupTestMethod · 0.74
SetupTestMethod · 0.74
SetupTestMethod · 0.74
BenchmarkFormatterPrettyFunction · 0.74
BenchmarkFormatterJSONFunction · 0.74