pub struct EventClient { /* private fields */ }Expand description
Client for event operations (queue configurations).
Implementations§
Source§impl EventClient
impl EventClient
Sourcepub async fn delete_queue_configuration(
&self,
queue_config: &QueueConfiguration,
) -> Result<()>
pub async fn delete_queue_configuration( &self, queue_config: &QueueConfiguration, ) -> Result<()>
Delete a queue configuration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn get_kafka_queue_configuration(
&self,
queue_topic: &str,
) -> Result<QueueConfiguration>
pub async fn get_kafka_queue_configuration( &self, queue_topic: &str, ) -> Result<QueueConfiguration>
Get a Kafka queue configuration by topic.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_queue_configuration(
&self,
queue_type: &str,
queue_name: &str,
) -> Result<QueueConfiguration>
pub async fn get_queue_configuration( &self, queue_type: &str, queue_name: &str, ) -> Result<QueueConfiguration>
Get a queue configuration by type and name.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn put_queue_configuration(
&self,
queue_config: &QueueConfiguration,
) -> Result<()>
pub async fn put_queue_configuration( &self, queue_config: &QueueConfiguration, ) -> Result<()>
Create or update a queue configuration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn get_all_queue_configurations(
&self,
) -> Result<HashMap<String, String>>
pub async fn get_all_queue_configurations( &self, ) -> Result<HashMap<String, String>>
Get all queue configurations
Unlike get_queue_configuration, the server’s “get all” endpoint
(GET /event/queue/config) returns a {queueIdentifier: value} object
rather than a list of QueueConfiguration. The HashMap<String, String>
here matches the server signature exactly: Orkes declares
Map<String, String> getQueueNames() in EventResource.
That method returns a hardcoded Map.of() – queue/broker integrations
moved to the Integrations API and the sibling putQueueConfig is
@Deprecated(forRemoval = true) – so in practice this is always empty on
Orkes. Plain OSS Conductor has no queue-config routes at all
(rest/.../EventResource.java maps only the event-handler endpoints), so
it answers 404.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_event_handlers(
&self,
event: &str,
active_only: bool,
) -> Result<Vec<Value>>
pub async fn get_event_handlers( &self, event: &str, active_only: bool, ) -> Result<Vec<Value>>
Get event handlers for a specific event.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_event_handlers(&self) -> Result<Vec<Value>>
pub async fn get_all_event_handlers(&self) -> Result<Vec<Value>>
Get all event handlers.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn register_event_handler(&self, event_handler: &Value) -> Result<()>
pub async fn register_event_handler(&self, event_handler: &Value) -> Result<()>
Register an event handler.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn update_event_handler(&self, event_handler: &Value) -> Result<()>
pub async fn update_event_handler(&self, event_handler: &Value) -> Result<()>
Update an event handler.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn remove_event_handler(&self, name: &str) -> Result<()>
pub async fn remove_event_handler(&self, name: &str) -> Result<()>
Remove an event handler.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.