v0.3.0 Release
This release expands what you can do in regards to snapshots and repositories.
Breaking changes
- GetHealth API return type changed from
[]ClusterHealth
toClusterHealth
- The array was a holdover from using the _cat API and didn't make logical sense as there is only one cluster health.
New APIs
- New struct
Repository
- New struct
IndexHealth
, similar to theClusterHealth
struct, but scoped to an index - New API
func (c *Client) GetRepositories() ([]Repository, error)
- List the snapshot repositories that are configured on the cluster
- New API
func (c *Client) SnapshotAllIndices(repository string, snapshot string) error
- Take a snapshot of all indices on the cluster
- New API
func (c *Client) SnapshotIndices(repository string, snapshot string, indices []string) error
- Take a snapshot of specific indices on the cluster
- New API
func (c *Client) RestoreSnapshotIndices(repository string, snapshot string, indices []string, restoredIndexPrefix string) error
- Restore specific indices of the named snapshot to the cluster
Changes
Jdk
added toNode
struct - contains the Jdk version of the nodeClusterHealth
has two new fieldsUnhealthIndices []IndexHealth
- contains indices that are non-green statusHealthyIndices []IndexHealth
- contains indices that are green status