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

Function New

handlers/stream/handler.go:61–70  ·  view source on GitHub ↗

New creates new handler object

(hCtx HandlerContext, config *Config)

Source from the content-addressed store, hash-verified

59
60// New creates new handler object
61func New(hCtx HandlerContext, config *Config) (*Handler, error) {
62 if err := config.Validate(); err != nil {
63 return nil, err
64 }
65
66 return &Handler{
67 HandlerContext: hCtx,
68 config: config,
69 }, nil
70}
71
72// Execute handles the image passthrough request, streaming the image directly to the response writer
73func (s *Handler) Execute(

Callers 1

SetupSuiteMethod · 0.92

Calls 1

ValidateMethod · 0.45

Tested by 1

SetupSuiteMethod · 0.74