Package org.kiwiproject.consul
Class SnapshotClient
java.lang.Object
org.kiwiproject.consul.SnapshotClient
HTTP Client for /v1/snapshot/ endpoints.
- See Also:
-
- The Consul API Docs for Snapshots
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidrestore(File sourceFile, QueryOptions queryOptions, Callback<Void> callback) Restores a snapshot stored in a file.voidsave(File destinationFile, QueryOptions queryOptions, Callback<BigInteger> callback) Requests a new snapshot and save it in a file.
-
Field Details
-
http
-
-
Method Details
-
save
Requests a new snapshot and save it in a file. Only a subset of the QueryOptions is supported: datacenter, consistency mode, and token.- Parameters:
destinationFile- file in which the snapshot is to be saved.queryOptions- query options. Only a subset of the QueryOptions is supported: datacenter, consistency mode, and token.callback- callback called once the operation is over. It the save operation is successful, the X-Consul-Index is sent.
-
restore
Restores a snapshot stored in a file.- Parameters:
sourceFile- source file where the snapshot is stored.queryOptions- query options. Only a subset of the QueryOptions is supported: datacenter, token.callback- callback called once the operation is over.
-
getConfig
-
getEventHandler
-