MCPcopy Create free account
hub / github.com/PuerkitoBio/fetchbot / Mux

Struct Mux

handler.go:51–57  ·  view source on GitHub ↗

Mux is a simple multiplexer for the Handler interface, similar to net/http.ServeMux. It is itself a Handler, and dispatches the calls to the matching Handlers. For error Handlers, if there is a Handler registered for the same error value, it will be called. Otherwise, if there is a Handler register

Source from the content-addressed store, hash-verified

49// In any case, if no Handler matches, the DefaultHandler is called, and it
50// defaults to a no-op.
51type Mux struct {
52 DefaultHandler Handler
53
54 mu sync.RWMutex
55 errm map[error]Handler
56 res map[*ResponseMatcher]bool // a set of entries
57}
58
59// NewMux returns an initialized Mux.
60func NewMux() *Mux {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected