Documentation ¶
Index ¶
- func GetLookupdTopicChannels(topic string, lookupdHTTPAddrs []string) ([]string, error)
- func GetLookupdTopicProducers(topic string, lookupdHTTPAddrs []string) ([]string, error)
- func GetLookupdTopics(lookupdHTTPAddrs []string) ([]string, error)
- func GetNSQDTopicProducers(topic string, nsqdHTTPAddrs []string) ([]string, error)
- func GetNSQDTopics(nsqdHTTPAddrs []string) ([]string, error)
- type ChannelStats
- type ChannelStatsByHost
- type ChannelStatsList
- type ClientInfo
- type ClientInfos
- type ClientsByHost
- type Producer
- type ProducerList
- type ProducersByHost
- type TopicStats
- type TopicStatsByHost
- type TopicStatsList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLookupdTopicChannels ¶
GetLookupdTopicChannels returns a []string containing a union of the channels from all the given lookupd for the given topic
func GetLookupdTopicProducers ¶
GetLookupdTopicProducers returns a []string of the broadcast_address:http_port of all the producers for a given topic by unioning the results returned from the given lookupd
func GetLookupdTopics ¶
GetLookupdTopics returns a []string containing a union of all the topics from all the given lookupd
func GetNSQDTopicProducers ¶
GetNSQDTopicProducers returns a []string containing the addresses of all the nsqd that produce the given topic out of the given nsqd
func GetNSQDTopics ¶
GetNSQDTopics returns a []string containing all the topics produced by the given nsqd
Types ¶
type ChannelStats ¶
type ChannelStats struct { HostAddress string ChannelName string Depth int64 MemoryDepth int64 BackendDepth int64 InFlightCount int64 DeferredCount int64 RequeueCount int64 TimeoutCount int64 MessageCount int64 ClientCount int Selected bool Topic string HostStats []*ChannelStats Clients []*ClientInfo Paused bool }
func (*ChannelStats) AddHostStats ¶
func (c *ChannelStats) AddHostStats(a *ChannelStats)
type ChannelStatsByHost ¶
type ChannelStatsByHost struct {
ChannelStatsList
}
func (ChannelStatsByHost) Less ¶
func (c ChannelStatsByHost) Less(i, j int) bool
type ChannelStatsList ¶
type ChannelStatsList []*ChannelStats
func (ChannelStatsList) Len ¶
func (c ChannelStatsList) Len() int
func (ChannelStatsList) Swap ¶
func (c ChannelStatsList) Swap(i, j int)
type ClientInfo ¶
type ClientInfos ¶
type ClientInfos []*ClientInfo
func (ClientInfos) Len ¶
func (c ClientInfos) Len() int
func (ClientInfos) Swap ¶
func (c ClientInfos) Swap(i, j int)
type ClientsByHost ¶
type ClientsByHost struct {
ClientInfos
}
func (ClientsByHost) Less ¶
func (c ClientsByHost) Less(i, j int) bool
type Producer ¶
type Producer struct { RemoteAddresses []string `json:"remote_addresses"` Address string `json:"address"` //TODO: remove for 1.0 Hostname string `json:"hostname"` BroadcastAddress string `json:"broadcast_address"` TcpPort int `json:"tcp_port"` HttpPort int `json:"http_port"` Version string `json:"version"` VersionObj *semver.Version `json:-` Topics []string `json:"topics"` OutOfDate bool }
func GetLookupdProducers ¶
GetLookupdProducers returns a slice of pointers to Producer structs containing metadata for each node connected to given lookupds
func (*Producer) HTTPAddress ¶
func (*Producer) IsInconsistent ¶
IsInconsistent checks for cases where an unexpected number of nsqd connections are reporting the same information to nsqlookupd (ie: multiple instances are using the same broadcast address), or cases where some nsqd are not reporting to all nsqlookupd.
func (*Producer) TCPAddress ¶
type ProducerList ¶
type ProducerList []*Producer
func (ProducerList) Len ¶
func (t ProducerList) Len() int
func (ProducerList) Swap ¶
func (t ProducerList) Swap(i, j int)
type ProducersByHost ¶
type ProducersByHost struct {
ProducerList
}
func (ProducersByHost) Less ¶
func (c ProducersByHost) Less(i, j int) bool
type TopicStats ¶
type TopicStats struct { HostAddress string Depth int64 MemoryDepth int64 BackendDepth int64 MessageCount int64 ChannelCount int Topic string Aggregate bool }
func GetNSQDStats ¶
func GetNSQDStats(nsqdHTTPAddrs []string, selectedTopic string) ([]*TopicStats, map[string]*ChannelStats, error)
GetNSQDStats returns aggregate topic and channel stats from the given NSQD instances
if selectedTopic is empty, this will return stats for *all* topic/channels and the ChannelStats dict will be keyed by topic + ':' + channel
func (*TopicStats) AddHostStats ¶
func (t *TopicStats) AddHostStats(a *TopicStats)
type TopicStatsByHost ¶
type TopicStatsByHost struct {
TopicStatsList
}
func (TopicStatsByHost) Less ¶
func (c TopicStatsByHost) Less(i, j int) bool
type TopicStatsList ¶
type TopicStatsList []*TopicStats
func (TopicStatsList) Len ¶
func (t TopicStatsList) Len() int
func (TopicStatsList) Swap ¶
func (t TopicStatsList) Swap(i, j int)