Skip to content

Add ingress-client API with typed reqwest clients, docs, and integration coverage#100

Open
robertream wants to merge 5 commits intorestatedev:mainfrom
robertream:client-macro
Open

Add ingress-client API with typed reqwest clients, docs, and integration coverage#100
robertream wants to merge 5 commits intorestatedev:mainfrom
robertream:client-macro

Conversation

@robertream
Copy link

Summary

Adds a new ingress-client capability to the Rust SDK with a typed reqwest-based client API, macro-generated typed ingress clients, and runtime/compile-time test coverage.

Included in this commit

New ingress client module

  • Added src/ingress.rs with:
    • Client
    • ServerUrl (+ TryFrom conversions)
    • AuthToken
    • Request<Res>
    • RequestError
  • Request customization support:
    • headers
    • idempotency key
    • timeout
    • delay query parameter

Macro-generated typed ingress clients

  • Updated macros/src/generator.rs to generate typed ingress client impls for services, objects, and workflows.
  • Generated ingress interfaces use request-oriented trait naming (Into*Request, Request<'a>, create_request).

Crate exports

  • Updated src/lib.rs and feature wiring so ingress client APIs are available behind ingress-client.

Tests

  • Added tests/ingress.rs runtime coverage for ingress behavior, including:
    • typed service/object/workflow invocation
    • auth token validation
    • status propagation
    • idempotency header propagation
    • serialize failure propagation
    • delay=...ms query serialization
  • Updated compile/UI tests for feature-gated ingress paths:
    • tests/compiletest.rs
    • tests/ui/ingress-client/*

Testcontainers

  • Added ingress-client feature forwarding in testcontainers/Cargo.toml.
  • Updated testcontainers/tests/test_container.rs to include a feature-gated typed ingress client integration path alongside the existing HTTP-based one.

Documentation

  • Added module-level ingress docs and typed usage examples.
  • Added API docs for ingress structs/methods and RequestError variants.
  • Added/updated doctests for key ingress entry points.

Validation

  • cargo test -q
  • cargo test --features ingress-client -q
  • cargo test -p restate-sdk-testcontainers --no-run
  • cargo test -p restate-sdk-testcontainers --features ingress-client --no-run

@github-actions
Copy link

github-actions bot commented Feb 20, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@robertream
Copy link
Author

I hadn't read the original issue and PR from a year ago. I updated the implementation to support the "executor" API that was suggested.

@robertream
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@tillrohrmann tillrohrmann mentioned this pull request Feb 23, 2026
@tillrohrmann tillrohrmann linked an issue Feb 23, 2026 that may be closed by this pull request
@tillrohrmann
Copy link
Contributor

Thanks a lot for creating this PR @robertream. It's quite a piece of work you have contributed 👏 We will probably need a little bit of time for reviewing your design and the code. Having typed clients for Rust would be kick-ass :-)

cc @slinkydeveloper for your input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingress Client

2 participants