| Crates.io | dtm_client |
| lib.rs | dtm_client |
| version | 0.1.0 |
| created_at | 2025-12-18 05:40:54.34153+00 |
| updated_at | 2025-12-18 05:40:54.34153+00 |
| description | Rust client for DTM (Distributed Transaction Manager) over HTTP and gRPC |
| homepage | |
| repository | https://github.com/tonyher0/dtm_client |
| max_upload_size | |
| id | 1991757 |
| size | 174,242 |
Rust client library for DTM (Distributed Transaction Manager): https://dtm.pub/
This crate targets feature parity with the upstream Go reference client:
main@4be5512)http (default): HTTP client (dtmcli) via reqwestgrpc (default): gRPC client (dtmgrpc) via tonicworkflow (default): workflow engine aligned with Go workflowbarrier-redis (default): Redis barrier utilities (Redis-only scope)Disable defaults if you want a smaller dependency footprint:
cargo add dtm_client --no-default-features --features http
DTM quick start projects (recommended to run locally):
Environment variables used by examples:
DTM_HTTP_URL (default http://localhost:36789/api/dtmsvr)DTM_GRPC_ADDR (default localhost:36790)BUSI_HTTP_BASE (default http://localhost:8082/api/busi_start)BUSI_GRPC_ADDR (default localhost:50589)WORKFLOW_HTTP_CALLBACK (default http://localhost:8080/workflowResume)WORKFLOW_GRPC_LISTEN (default 127.0.0.1:50051)WORKFLOW_GRPC_CLIENT_HOST (default 127.0.0.1:50051)REDIS_URL (default redis://127.0.0.1/)GID (optional): if set, examples will reuse it instead of calling DTM /newGid or NewGid.Run examples:
cargo run --example dtmcli_saga
cargo run --example dtmgrpc_saga
cargo run --example workflow_http
cargo run --example workflow_grpc
cargo run --example barrier_redis
Notes:
IS_DOCKER=1 so localhost is rewritten to host.docker.internal.host:port/fully.qualified.Service/Method (e.g. localhost:50589/busi.Busi/TransOut).See docs/parity.md.