Documentation ¶
Index ¶
- func GETV1(endpoint string, v interface{}) error
- func GetTopicChannelArgs(rp getter) (string, string, error)
- func NegotiateV1(method string, endpoint string, body io.Reader) (*simplejson.Json, error)
- func NegotiateVersionWrapper(w http.ResponseWriter, req *http.Request, f func() (interface{}, error))
- func NewDeadlineTransport(timeout time.Duration) *http.Transport
- func RequirePOST(req *http.Request, f func() (interface{}, error)) func() (interface{}, error)
- func Respond(w http.ResponseWriter, statusCode int, statusTxt string, data interface{})
- func RespondV1(w http.ResponseWriter, code int, data interface{})
- func Serve(listener net.Listener, handler http.Handler, l app.Logger, proto string)
- func V1Wrapper(w http.ResponseWriter, req *http.Request, f func() (interface{}, error))
- type Err
- type PostParams
- type ReqParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GETV1 ¶
GETV1 is a helper function to perform a V1 HTTP request and parse our NSQ daemon's expected response format, with deadlines.
func GetTopicChannelArgs ¶
func NegotiateV1 ¶
NegotiateV1 is a helper function to perform a v1 HTTP request and fallback to parsing the old backwards-compatible response format
func NegotiateVersionWrapper ¶
func NegotiateVersionWrapper(w http.ResponseWriter, req *http.Request, f func() (interface{}, error))
func NewDeadlineTransport ¶
A custom http.Transport with support for deadline timeouts
func RequirePOST ¶
func Respond ¶
func Respond(w http.ResponseWriter, statusCode int, statusTxt string, data interface{})
func RespondV1 ¶
func RespondV1(w http.ResponseWriter, code int, data interface{})
Types ¶
type PostParams ¶
Click to show internal directories.
Click to hide internal directories.