MCPcopy
hub / github.com/perkeep/perkeep / GetHandler

Method GetHandler

pkg/serverinit/serverinit.go:255–264  ·  view source on GitHub ↗
(prefix string)

Source from the content-addressed store, hash-verified

253}
254
255func (hl *handlerLoader) GetHandler(prefix string) (interface{}, error) {
256 hl.setupHandler(prefix)
257 if s, ok := hl.handler[prefix].(blobserver.Storage); ok {
258 return s, nil
259 }
260 if h, ok := hl.handler[prefix].(http.Handler); ok {
261 return h, nil
262 }
263 return nil, fmt.Errorf("bogus http or storage handler referenced as %q", prefix)
264}
265
266func (hl *handlerLoader) GetHandlerType(prefix string) string {
267 return hl.configType(prefix)

Callers 1

initPublisherRootNodeMethod · 0.95

Calls 1

setupHandlerMethod · 0.95

Tested by

no test coverage detected