Documentation ¶
Index ¶
- Constants
- func APIRequestNegotiateV1(method string, endpoint string, body io.Reader) (*simplejson.Json, error)
- func ApiRequestV1(endpoint string, v interface{}) error
- func ApiResponse(w http.ResponseWriter, statusCode int, statusTxt string, data interface{})
- func ByteToBase10(b []byte) (n uint64, err error)
- func Commafy(i interface{}) string
- func FloatToPercent(i float64) string
- func GetTopicChannelArgs(rp Getter) (string, string, error)
- func HTTPServer(listener net.Listener, handler http.Handler, l logger, proto string)
- func IsValidChannelName(name string) bool
- func IsValidTopicName(name string) bool
- func NanoSecondToHuman(v float64) string
- func NegotiateAPIResponseWrapper(w http.ResponseWriter, req *http.Request, f func() (interface{}, error))
- func NewDeadlineTransport(timeout time.Duration) *http.Transport
- func POSTRequired(req *http.Request, f func() (interface{}, error)) func() (interface{}, error)
- func ParseOpts(cfg *nsq.Config, opts StringArray) error
- func PercSuffix(i float64) string
- func SendFramedResponse(w io.Writer, frameType int32, data []byte) (int, error)
- func SendResponse(w io.Writer, data []byte) (int, error)
- func StatsdHostKey(h string) string
- func StringAdd(s []string, a string) []string
- func StringUnion(s []string, a []string) []string
- func TCPServer(listener net.Listener, handler TCPHandler, l logger)
- func V1APIResponseWrapper(w http.ResponseWriter, req *http.Request, f func() (interface{}, error))
- func V1ApiResponse(w http.ResponseWriter, code int, data interface{})
- func Version(app string) string
- type ChildErr
- type ClientErr
- type E2eProcessingLatencyAggregate
- func (A *E2eProcessingLatencyAggregate) Add(B *E2eProcessingLatencyAggregate, N int) *E2eProcessingLatencyAggregate
- func (e *E2eProcessingLatencyAggregate) Host() string
- func (e *E2eProcessingLatencyAggregate) Len() int
- func (e *E2eProcessingLatencyAggregate) Less(i, j int) bool
- func (e *E2eProcessingLatencyAggregate) Swap(i, j int)
- func (e *E2eProcessingLatencyAggregate) Target(key string) ([]string, string)
- type FatalClientErr
- type FloatArray
- type Getter
- type HTTPError
- type PercentileResult
- type PostParams
- type Protocol
- type Quantile
- type ReqParams
- type StatsdClient
- func (c *StatsdClient) Close() error
- func (c *StatsdClient) CreateSocket() error
- func (c *StatsdClient) Decr(stat string, count int64) error
- func (c *StatsdClient) Gauge(stat string, value int64) error
- func (c *StatsdClient) Incr(stat string, count int64) error
- func (c *StatsdClient) String() string
- func (c *StatsdClient) Timing(stat string, delta int64) error
- type StringArray
- type TCPHandler
- type WaitGroupWrapper
Constants ¶
const BINARY_VERSION = "0.3.2"
Variables ¶
This section is empty.
Functions ¶
func APIRequestNegotiateV1 ¶ added in v0.2.29
func APIRequestNegotiateV1(method string, endpoint string, body io.Reader) (*simplejson.Json, error)
APIRequestNegotiateV1 is a helper function to perform a v1 HTTP request and fallback to parsing the old backwards-compatible response format
func ApiRequestV1 ¶ added in v0.2.29
ApiRequestV1 is a helper function to perform a v1 HTTP request and parse our NSQ daemon's expected response format, with deadlines.
func ApiResponse ¶
func ApiResponse(w http.ResponseWriter, statusCode int, statusTxt string, data interface{})
func ByteToBase10 ¶ added in v0.2.16
func FloatToPercent ¶ added in v0.2.24
func HTTPServer ¶ added in v0.2.22
func IsValidChannelName ¶ added in v0.2.29
IsValidChannelName checks a channel name for correctness
func IsValidTopicName ¶ added in v0.2.29
IsValidTopicName checks a topic name for correctness
func NanoSecondToHuman ¶ added in v0.2.24
func NegotiateAPIResponseWrapper ¶ added in v0.2.29
func NegotiateAPIResponseWrapper(w http.ResponseWriter, req *http.Request, f func() (interface{}, error))
func NewDeadlineTransport ¶ added in v0.2.23
A custom http.Transport with support for deadline timeouts
func POSTRequired ¶ added in v0.2.29
func ParseOpts ¶ added in v0.2.31
func ParseOpts(cfg *nsq.Config, opts StringArray) error
func PercSuffix ¶ added in v0.2.24
func SendFramedResponse ¶ added in v0.2.23
SendFramedResponse is a server side utility function to prefix data with a length header and frame header and write to the supplied Writer
func SendResponse ¶ added in v0.2.23
SendResponse is a server side utility function to prefix data with a length header and write to the supplied Writer
func StatsdHostKey ¶ added in v0.2.22
func StringUnion ¶
func TCPServer ¶ added in v0.2.22
func TCPServer(listener net.Listener, handler TCPHandler, l logger)
func V1APIResponseWrapper ¶ added in v0.2.29
func V1APIResponseWrapper(w http.ResponseWriter, req *http.Request, f func() (interface{}, error))
func V1ApiResponse ¶ added in v0.2.29
func V1ApiResponse(w http.ResponseWriter, code int, data interface{})
Types ¶
type ClientErr ¶ added in v0.2.23
ClientErr provides a way for NSQ daemons to log a human reabable error string and return a machine readable string to the client.
see docs/protocol.md for error codes by command
func NewClientErr ¶ added in v0.2.23
NewClientErr creates a ClientErr with the supplied human and machine readable strings
type E2eProcessingLatencyAggregate ¶ added in v0.2.24
type E2eProcessingLatencyAggregate struct { Count int `json:"count"` Percentiles []map[string]float64 `json:"percentiles"` Topic string `json:"topic"` Channel string `json:"channel"` Addr string `json:"host"` }
func E2eProcessingLatencyAggregateFromJson ¶ added in v0.2.24
func E2eProcessingLatencyAggregateFromJson(j *simplejson.Json, topic, channel, host string) *E2eProcessingLatencyAggregate
func (*E2eProcessingLatencyAggregate) Add ¶ added in v0.2.24
func (A *E2eProcessingLatencyAggregate) Add(B *E2eProcessingLatencyAggregate, N int) *E2eProcessingLatencyAggregate
func (*E2eProcessingLatencyAggregate) Host ¶ added in v0.2.24
func (e *E2eProcessingLatencyAggregate) Host() string
func (*E2eProcessingLatencyAggregate) Len ¶ added in v0.2.24
func (e *E2eProcessingLatencyAggregate) Len() int
func (*E2eProcessingLatencyAggregate) Less ¶ added in v0.2.24
func (e *E2eProcessingLatencyAggregate) Less(i, j int) bool
func (*E2eProcessingLatencyAggregate) Swap ¶ added in v0.2.24
func (e *E2eProcessingLatencyAggregate) Swap(i, j int)
type FatalClientErr ¶ added in v0.2.23
func NewFatalClientErr ¶ added in v0.2.23
func NewFatalClientErr(parent error, code string, description string) *FatalClientErr
NewClientErr creates a ClientErr with the supplied human and machine readable strings
func (*FatalClientErr) Error ¶ added in v0.2.23
func (e *FatalClientErr) Error() string
Error returns the machine readable form
func (*FatalClientErr) Parent ¶ added in v0.2.23
func (e *FatalClientErr) Parent() error
Parent returns the parent error
type FloatArray ¶ added in v0.2.24
type FloatArray []float64
func (FloatArray) Len ¶ added in v0.2.24
func (a FloatArray) Len() int
func (FloatArray) Less ¶ added in v0.2.24
func (a FloatArray) Less(i, j int) bool
func (*FloatArray) Set ¶ added in v0.2.24
func (a *FloatArray) Set(param string) error
func (*FloatArray) String ¶ added in v0.2.24
func (a *FloatArray) String() string
func (FloatArray) Swap ¶ added in v0.2.24
func (a FloatArray) Swap(i, j int)
type PercentileResult ¶ added in v0.2.24
type PercentileResult struct { Count int `json:"count"` Percentiles []map[string]float64 `json:"percentiles"` }
func (*PercentileResult) String ¶ added in v0.2.24
func (pr *PercentileResult) String() string
type PostParams ¶ added in v0.2.17
type Protocol ¶ added in v0.2.23
Protocol describes the basic behavior of any protocol in the system
type Quantile ¶ added in v0.2.24
type Quantile struct { sync.Mutex Percentiles []float64 MoveWindowTime time.Duration // contains filtered or unexported fields }
func NewQuantile ¶ added in v0.2.24
func (*Quantile) PercentileResult ¶ added in v0.2.24
func (q *Quantile) PercentileResult() *PercentileResult
func (*Quantile) QueryHandler ¶ added in v0.2.24
type StatsdClient ¶ added in v0.2.16
type StatsdClient struct {
// contains filtered or unexported fields
}
func NewStatsdClient ¶ added in v0.2.16
func NewStatsdClient(addr string, prefix string) *StatsdClient
func (*StatsdClient) Close ¶ added in v0.2.16
func (c *StatsdClient) Close() error
func (*StatsdClient) CreateSocket ¶ added in v0.2.16
func (c *StatsdClient) CreateSocket() error
func (*StatsdClient) Decr ¶ added in v0.2.16
func (c *StatsdClient) Decr(stat string, count int64) error
func (*StatsdClient) Gauge ¶ added in v0.2.16
func (c *StatsdClient) Gauge(stat string, value int64) error
func (*StatsdClient) Incr ¶ added in v0.2.16
func (c *StatsdClient) Incr(stat string, count int64) error
func (*StatsdClient) String ¶ added in v0.2.16
func (c *StatsdClient) String() string
type StringArray ¶
type StringArray []string
func (*StringArray) Set ¶
func (a *StringArray) Set(s string) error
func (*StringArray) String ¶
func (a *StringArray) String() string
type TCPHandler ¶ added in v0.2.22
type WaitGroupWrapper ¶
func (*WaitGroupWrapper) Wrap ¶
func (w *WaitGroupWrapper) Wrap(cb func())
Source Files ¶
- api_request.go
- api_response.go
- binary_version.go
- byte_base10.go
- errors.go
- float_array.go
- http_server.go
- logger.go
- names.go
- parse_opts.go
- percentile.go
- protocol.go
- req_params.go
- statsd.go
- statsd_client.go
- string_array.go
- strings.go
- tcp_server.go
- template_functions.go
- topic_channel_args.go
- wait_group_wrapper.go
Directories ¶
Path | Synopsis |
---|---|
COPIED FROM http://code.google.com/p/go-semver/ The version package implements semantic versions as described at http://semver.org/
|
COPIED FROM http://code.google.com/p/go-semver/ The version package implements semantic versions as described at http://semver.org/ |