A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/github/vulcanizer/commit/aef7e71367ba2e7f85df1fb570633e86b8eb5144 below:

added SnapshotAllIndicesWithBodyParams function · github/vulcanizer@aef7e71 · GitHub

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

+28

-0

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+28

-0

lines changed Original file line number Diff line number Diff line change

@@ -1174,6 +1174,34 @@ func (c *Client) SnapshotAllIndices(repository string, snapshot string) error {

1174 1174

return err

1175 1175

}

1176 1176 1177 +

func (c *Client) SnapshotAllIndicesWithBodyParams(repository string, snapshot string, bodyParams map[string]interface{}) error {

1178 +

if repository == "" {

1179 +

return errors.New("empty string for repository is not allowed")

1180 +

}

1181 + 1182 +

if snapshot == "" {

1183 +

return errors.New("empty string for snapshot is not allowed")

1184 +

}

1185 + 1186 +

if bodyParams == nil {

1187 +

return errors.New("no body params provided, please use SnapshotAllIndices Function instead")

1188 +

}

1189 + 1190 +

parsedJson, parsingErr := json.Marshal(bodyParams)

1191 + 1192 +

if parsingErr != nil {

1193 +

return parsingErr

1194 +

}

1195 + 1196 +

agent := c.buildPutRequest(fmt.Sprintf("_snapshot/%s/%s", repository, snapshot)).

1197 +

Set("Content-Type", "application/json").

1198 +

Send(parsedJson)

1199 + 1200 +

_, err := handleErrWithBytes(agent)

1201 + 1202 +

return err

1203 +

}

1204 + 1177 1205

// Restore an index or indices on the cluster

1178 1206

//

1179 1207

// Use case: You want to restore a particular index or indices onto your cluster with a new name.

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