Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPResponder ¶ added in v0.0.3
func NewHTTPResponder ¶ added in v0.0.3
func NewHTTPResponder(l log.Logger) HTTPResponder
func (HTTPResponder) Reply ¶ added in v0.0.3
func (a HTTPResponder) Reply(w http.ResponseWriter, status int, rsp any)
func (HTTPResponder) ReplyOK ¶ added in v0.0.3
func (a HTTPResponder) ReplyOK(w http.ResponseWriter, rsp any)
func (HTTPResponder) ReplyWithError ¶ added in v0.0.3
func (a HTTPResponder) ReplyWithError(w http.ResponseWriter, err error)
type HTTPServer ¶
func (*HTTPServer) IsReady ¶
func (s *HTTPServer) IsReady() bool
IsReady returns true if the server is ready to handle http requests.
func (*HTTPServer) RealAddress ¶
func (s *HTTPServer) RealAddress() string
RealAddress returns the address the server is running on.
func (*HTTPServer) Run ¶
func (s *HTTPServer) Run()
Run listens and serves http requests. It returns only after the server is stopped.
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop()
Stop tries to stop the server synchronously. It panics if the server is not stopped after 5s.
func (*HTTPServer) WaitReady ¶
func (s *HTTPServer) WaitReady()
WaitReady returns only after the server is ready to handle http requests.
Click to show internal directories.
Click to hide internal directories.