Documentation ¶
Overview ¶
Returns basic information about the health of the cluster.
Index ¶
- Variables
- type Health
- func (r Health) Do(ctx context.Context) (*http.Response, error)
- func (r *Health) ExpandWildcards(value string) *Health
- func (r *Health) Header(key, value string) *Health
- func (r *Health) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Health) Index(v string) *Health
- func (r Health) IsSuccess(ctx context.Context) (bool, error)
- func (r *Health) Level(enum level.Level) *Health
- func (r *Health) Local(b bool) *Health
- func (r *Health) MasterTimeout(value string) *Health
- func (r *Health) Timeout(value string) *Health
- func (r *Health) WaitForActiveShards(value string) *Health
- func (r *Health) WaitForEvents(enum waitforevents.WaitForEvents) *Health
- func (r *Health) WaitForNoInitializingShards(b bool) *Health
- func (r *Health) WaitForNoRelocatingShards(b bool) *Health
- func (r *Health) WaitForNodes(value string) *Health
- func (r *Health) WaitForStatus(enum healthstatus.HealthStatus) *Health
- type NewHealth
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type Health ¶
type Health struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Health
Returns basic information about the health of the cluster.
https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-health.html
func (*Health) ExpandWildcards ¶
ExpandWildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. API name: expand_wildcards
func (*Health) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Health) Index ¶
Index Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *. API Name: index
func (Health) IsSuccess ¶
IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.
func (*Health) Level ¶
Level Can be one of cluster, indices or shards. Controls the details level of the health information returned. API name: level
func (*Health) Local ¶
Local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. API name: local
func (*Health) MasterTimeout ¶
MasterTimeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout
func (*Health) Timeout ¶
Timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. API name: timeout
func (*Health) WaitForActiveShards ¶
WaitForActiveShards A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. API name: wait_for_active_shards
func (*Health) WaitForEvents ¶
func (r *Health) WaitForEvents(enum waitforevents.WaitForEvents) *Health
WaitForEvents Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. API name: wait_for_events
func (*Health) WaitForNoInitializingShards ¶
WaitForNoInitializingShards A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards. API name: wait_for_no_initializing_shards
func (*Health) WaitForNoRelocatingShards ¶
WaitForNoRelocatingShards A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards. API name: wait_for_no_relocating_shards
func (*Health) WaitForNodes ¶
WaitForNodes The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, it is possible to use ge(N), le(N), gt(N) and lt(N) notation. API name: wait_for_nodes
func (*Health) WaitForStatus ¶
func (r *Health) WaitForStatus(enum healthstatus.HealthStatus) *Health
WaitForStatus One of green, yellow or red. Will wait (until the timeout provided) until the status of the cluster changes to the one provided or better, i.e. green > yellow > red. By default, will not wait for any status. API name: wait_for_status
type NewHealth ¶
type NewHealth func() *Health
NewHealth type alias for index.
func NewHealthFunc ¶
func NewHealthFunc(tp elastictransport.Interface) NewHealth
NewHealthFunc returns a new instance of Health with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.