road-runner-common 0.22.0

Shared Rust utilities for exchange ecosystem backend services.
Documentation
//! cex-policy quorum-governance client + `QuorumReached` consumer (feature
//! `governance`).
//!
//! Every governed action (FeeChange, AuthzChange, AuthRiskRuleset, Listing,
//! ...) uses the same shape: submit a proposal against a policy id, wait for
//! `QuorumReached` on the Kafka governance stream, apply the payload. Only the
//! payload shape and the apply step are action-specific — implement
//! [`GovernanceHandler`] for those and this module handles the gRPC client and
//! the consumer loop.
//!
//! ```ignore
//! let policy = PolicyGovernanceClient::new(std::env::var("POLICY_INTERNAL_GRPC_URL").ok());
//! let proposal_id = policy.submit_proposal(&listing_policy_id, admin_id, &payload).await?;
//! // ... later, driven by the consumer ...
//! spawn_governance_consumer(cfg, Arc::new(my_handler));
//! ```

pub mod client;
pub mod consumer;

pub use client::{GovernanceProposal, PolicyGovernanceClient};
pub use consumer::{spawn_governance_consumer, GovernanceConsumerConfig, GovernanceHandler};