This repository was archived by the owner on Apr 15, 2025. It is now read-only.
File tree Expand file treeCollapse file tree 1 file changed+21
-0
lines changedFilter options
+21
-0
lines changed Original file line number Diff line number Diff line change
@@ -1802,3 +1802,24 @@ func (c *Client) RemoveIndexILMPolicy(index string) error {
1802
1802
1803
1803
return nil
1804
1804
}
1805
+
1806
+
// Function called LicenseCluster. This function takes a json document as a string which is the license to apply to the Elasticsearch cluster.
1807
+
func (c *Client) LicenseCluster(license string) error {
1808
+
// If the license is empty, return an error
1809
+
if license == "" {
1810
+
return errors.New("license is required")
1811
+
}
1812
+
1813
+
// Build the request to apply the license to the cluster
1814
+
agent := c.buildPutRequest("_license").
1815
+
Set("Content-Type", "application/json").
1816
+
Send(license)
1817
+
1818
+
// Execute the request
1819
+
_, err := handleErrWithBytes(agent)
1820
+
if err != nil {
1821
+
return err
1822
+
}
1823
+
1824
+
return nil
1825
+
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4