justinmclean opened a new issue, #4015:
URL: https://github.com/apache/iggy/issues/4015

   ### Description
   
   The Rust client can report the currently connected client and enumerate all 
connected clients (`core/common/src/traits/system_client.rs`). The Python SDK 
exposes none of it, so a Python operator cannot see connection state that every 
other SDK can. Part of the parity work tracked in #3893.
   
   ```rust
   async fn get_me(&self) -> Result<ClientInfoDetails, IggyError>;
   async fn get_client(&self, client_id: u32) -> 
Result<Option<ClientInfoDetails>, IggyError>;
   async fn get_clients(&self) -> Result<Vec<ClientInfo>, IggyError>;
   ```
   
   `get_client` and `get_clients` require permission to read server info; 
`get_me` requires authentication only.
   
   ### Affected area / component
   
   _No response_
   
   ### Proposed solution
   
   - Add `foreign/python/src/client_info.rs` wrapping `ClientInfo` and 
`ClientInfoDetails`, following `src/user.rs` (pyclass + `From` conversions + 
`gen_stub_pyclass`), and register it in `src/lib.rs`.
   - Add the three methods to `src/client.rs`. `get_client` returns `None` when 
the id is unknown rather than raising.
   - Add the stub entries to `foreign/python/apache_iggy.pyi`.
   - Add `foreign/python/tests/test_client_info.py`: assert `get_me()` returns 
the connected client, that its id appears in `get_clients()`, and that 
`get_client()` on an unknown id returns `None`.
   
   ### Alternatives considered
   
   _No response_
   
   ### Contribution
   
   - [ ] I'm willing to submit a pull request to implement this feature
   
   ### Good first issue
   
   - [x] I think this could be a good first issue for a new contributor


-- 
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]

Reply via email to