Documentation ¶
Index ¶
Constants ¶
View Source
const ( HealthGreen = iota HealthYellow HealthRed )
Possible values for the HealthStatus
View Source
const MsgHealthy = "elasticsearch is healthy and the required indexes exist"
MsgHealthy Check message returned when elasticsearch is healthy and the required indexes exist
View Source
const ServiceName = "elasticsearch"
ServiceName elasticsearch
Variables ¶
View Source
var ( ErrorUnexpectedStatusCode = errors.New("unexpected status code from api") ErrorParsingBody = errors.New("error parsing cluster health response body") ErrorClusterAtRisk = errors.New("error cluster state yellow. Data might be at risk, check your replica shards") ErrorUnhealthyClusterStatus = errors.New("error cluster health red. Cluster is unhealthy") ErrorInvalidHealthStatus = errors.New("error invalid health status returned") ErrorIndexDoesNotExist = errors.New("error index does not exist in cluster") )
List of errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an ElasticSearch client containing an HTTP client to contact the elasticsearch API.
func NewClient ¶
NewClient returns a new initialised elasticsearch client with the default dp-net/http client
type ClusterHealth ¶
type ClusterHealth struct {
Status string `json:"status"`
}
ClusterHealth represents the response from the elasticsearch cluster health check
type HealthStatus ¶
type HealthStatus int
HealthStatus - iota enum of possible health states returned by Elasticsearch API
func (HealthStatus) String ¶
func (hs HealthStatus) String() string
Click to show internal directories.
Click to hide internal directories.