Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrConsumerAlreadyRegistered is returned if a consumer is already registered ErrConsumerAlreadyRegistered = errors.New("consumer already registered") // ErrInitialCallTimeout is returned if the initial clusterinfo call timed out ErrInitialCallTimeout = errors.New("initial cluster info call timed out") )
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Name string `json:"name"` ClusterName string `json:"cluster_name"` ClusterUUID string `json:"cluster_uuid"` Version VersionInfo `json:"version"` Tagline string `json:"tagline"` }
Response is the cluster info retrievable from the / endpoint
type Retriever ¶
type Retriever struct {
// contains filtered or unexported fields
}
Retriever periodically gets the cluster info from the / endpoint and sends it to all registered consumer channels
func (*Retriever) Collect ¶
func (r *Retriever) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface
func (*Retriever) Describe ¶
func (r *Retriever) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface
func (*Retriever) RegisterConsumer ¶
RegisterConsumer registers a consumer for cluster info updates
type VersionInfo ¶
type VersionInfo struct { Number semver.Version `json:"number"` BuildHash string `json:"build_hash"` BuildDate string `json:"build_date"` BuildSnapshot bool `json:"build_snapshot"` LuceneVersion semver.Version `json:"lucene_version"` }
VersionInfo is the version info retrievable from the / endpoint, embedded in Response
Click to show internal directories.
Click to hide internal directories.