Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
Types ¶
type Config ¶
type Config struct {
Addr string
// enables https if not nil
TLS *tlsprovider.Config
// if non-empty, a fixed status code returned for all requests
// when zero, defaults to 200
StatusCode int
}
type FakeHandler ¶
type FakeHandler struct {
// if non-zero, forces this status code for all responses.
StatusCode int
Logger *slog.Logger
}
func (FakeHandler) ServeHTTP ¶
func (h FakeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.