slbotbm commented on code in PR #4616:
URL: https://github.com/apache/iggy/pull/4616#discussion_r4366309230
##########
foreign/python/src/client.rs:
##########
@@ -257,6 +257,63 @@ impl IggyClient {
})
}
+ /// Capture a diagnostic snapshot of the server as a compressed ZIP
archive.
+ ///
+ /// Requires an authenticated session whose user holds the `manage_servers`
+ /// global permission.
+ ///
+ /// Args:
+ /// compression: Archive compression method. One of `"stored"`,
+ /// `"deflated"`, `"bzip2"`, `"zstd"`, `"lzma"`, `"xz"`.
+ /// snapshot_types: Data to include in the snapshot. Each entry is one
+ /// of `"filesystem_overview"`, `"process_list"`,
`"resource_usage"`,
+ /// `"test"`, `"server_logs"`, `"server_config"`, `"all"`. `"all"`
+ /// cannot be combined with any other snapshot type.
+ ///
+ /// Returns:
+ /// An awaitable that resolves to the ZIP archive `bytes`.
+ ///
+ /// Raises:
+ /// ValueError: If `compression` is empty or unknown, `snapshot_types`
+ /// is empty, or any entry in `snapshot_types` is unknown.
+ /// RuntimeError: If the client is not connected, the session is not
+ /// authenticated, the user lacks the permission, `"all"` is
+ /// combined with another snapshot type, the 30-second binary
+ /// operation deadline expires, or the request fails.
+
#[gen_stub(override_return_type(type_repr="collections.abc.Awaitable[bytes]",
imports=("collections.abc")))]
+ fn snapshot<'a>(
+ &self,
+ py: Python<'a>,
+ compression: &str,
Review Comment:
rename to snapshot_compression
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]