Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NodesShutdown ¶
NodesShutdown allows the caller to shutdown between one and all nodes in the cluster delay is a integer representing number of seconds passing "" or "_all" for the nodes parameter will shut down all nodes see http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown/
Types ¶
type AllocateCommand ¶
type CancelCommand ¶
type ClusterHealthResponse ¶
type ClusterHealthResponse struct {
ClusterName string `json:"cluster_name"`
Status string `json:"status"`
TimedOut bool `json:"timed_out"`
NumberOfNodes int `json:"number_of_nodes"`
NumberOfDataNodes int `json:"number_of_data_nodes"`
ActivePrimaryShards int `json:"active_primary_shards"`
ActiveShards int `json:"active_shards"`
RelocatingShards int `json:"relocating_shards"`
InitializingShards int `json:"initializing_shards"`
UnassignedShards int `json:"unassigned_shards"`
}
func Health ¶
func Health(pretty bool, indices ...string) (ClusterHealthResponse, error)
Health gets a very simple status on the health of the cluster. This call defaults to no parameters see http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html
func HealthWithParameters ¶
func HealthWithParameters(pretty bool, level string, wait_for_status string, timeout string, wait_for_relocating_shards int, wait_for_nodes int, indices ...string) (ClusterHealthResponse, error)
HealthWithParameters gets cluster health data and exposes all parameters to the caller level - one of cluster, indices, or shards wait_for_status - green, yellow, or red. Will wait until the status changes to passed status wait_for_relocating_shards - How many relocating shards to wait for. Default no wait wait_for_nodes - The request waits until N nodes are available timeout - How long to wait if any wait_* params are passed. Defaults to 30s
func Reroute ¶
func Reroute(pretty bool, dryRun bool, commands Commands) (ClusterHealthResponse, error)
The cluster health API allows to get a very simple status on the health of the cluster. see http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html TODO: implement wait_for_status, timeout, wait_for_relocating_shards, wait_for_nodes TODO: implement level (Can be one of cluster, indices or shards. Controls the details level of the health information returned. Defaults to cluster.)
type ClusterSettingsResponse ¶
type ClusterSettingsResponse struct {
Transient map[string]int `json:"transient"`
Persistent map[string]int `json:"persistent"`
}
func UpdateSettings ¶
func UpdateSettings(settingType string, key string, value int) (ClusterSettingsResponse, error)
UpdateSettings allows to update cluster wide specific settings. Defaults to Transient setting Settings updated can either be persistent (applied cross restarts) or transient (will not survive a full cluster restart). http://www.elasticsearch.org/guide/reference/api/admin-cluster-update-settings.html
type ClusterStateResponse ¶
type ClusterStateResponse struct {
}
func State ¶
func State(filter_nodes bool, filter_routing_table bool, filter_metadata bool, filter_blocks bool, filter_indices ...string) (ClusterStateResponse, error)
State gets the comprehensive state information for the whole cluster see http://www.elasticsearch.org/guide/reference/api/admin-cluster-state/