Releases: github/vulcanizer
Releases · github/vulcanizer
v0.4.0 Release
This release adds some features around managing indices.
Breaking Changes
- Renamed
ClusterSettings
struct toSettings
- This struct is now used when listing Cluster or Index settings. - Renamed
func (c *Client) GetSettings()
method tofunc (c *Client) GetClusterSettings()
to differentiate between Cluster or Index settings. - Renamed
func (c *Client) SetSetting
method tofunc (c *Client) SetClusterSetting
to differentitate between Cluster or Index settings. - Added
indexSettings map[string]interface{}
to the arguments offunc (c *Client) RestoreSnapshotIndices
to allow setting specific index settings when restoring an index.
New APIs
func (c *Client) DeleteIndex(indexName string) error
- Deleting an indexfunc (c *Client) GetPrettyIndexSettings(index string) (string, error)
- Get a human readable JSON of the settings of an indexfunc (c *Client) GetIndexSettings(index string) ([]Setting, error)
- Get the settings of an indexfunc (c *Client) SetIndexSetting(index, setting, value string) (string, string, error)
- Set the settings of an indexfunc (c *Client) GetPrettyIndexMappings(index string)
- Get a human readable JSON of the mappings of an indexfunc (c *Client) AnalyzeText(analyzer, text string) ([]Token, error)
- Call the Elasticsearch analyze API to preview how given text will be broken down into tokens.func (c *Client) AnalyzeTextWithField(index, field, text string) ([]Token, error)
- Call the Elasticsearch analyze API with a specific field to preview how the text will be broken down into tokens for that field.
Changes
- Added additional fields to the
Client
struct to support more connection propertiesSecure
- boolean whether to connect using HTTPS or notAuth
- struct containing username and password for HTTP basic authTimeout
- set atime.Duration
for the API calls to ElasticsearchTLSConfig
- settls.Config
options for things like client certificates or ignoring certificate validation
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
Managing snapshots
This release adds two new functions around managing snapshots and repositories.
-
func (c *Client) DeleteSnapshot(repository string, snapshot string) error
-
func (c *Client) VerifyRepository(repository string) (bool, error)
Standardize vulcanizer API surface
Features:
- Client methods all return a specific struct type and an error.
type Client
func NewClient(host string, port int) *Client
func (c *Client) DrainServer(serverToDrain string) (ExcludeSettings, error)
func (c *Client) FillAll() (ExcludeSettings, error)
func (c *Client) FillOneServer(serverToFill string) (ExcludeSettings, error)
func (c *Client) GetClusterExcludeSettings() (ExcludeSettings, error)
func (c *Client) GetHealth() ([]ClusterHealth, error)
func (c *Client) GetIndices() ([]Index, error)
func (c *Client) GetNodes() ([]Node, error)
func (c *Client) GetSettings() (ClusterSettings, error)
func (c *Client) GetSnapshotStatus(repository string, snapshot string) (Snapshot, error)
func (c *Client) GetSnapshots(repository string) ([]Snapshot, error)
func (c *Client) SetAllocation(allocation string) (string, error)
func (c *Client) SetSetting(setting string, value string) (string, string, error)
type ClusterHealth
type ClusterSetting
type ClusterSettings
type ExcludeSettings
type Index
type Node
type Snapshot