s2-sdk. Please update your Cargo.toml to use s2-sdk instead.Expand description
DEPRECATED: This crate has been renamed to s2-sdk.
Please update your Cargo.toml:
[dependencies]
s2-sdk = "0.22"And update your imports from use s2::... to use s2_sdk::....
The Rust SDK provides ergonomic wrappers and utilities to interact with the S2 API.
§Getting started
-
Ensure you have
tokioadded as a dependency. The SDK relies on Tokio for executing async code.cargo add tokio --features full -
Add the
streamstoredependency to your project:cargo add streamstore -
Generate an authentication token by logging onto the web console at s2.dev.
-
Make a request using SDK client.
let config = s2::ClientConfig::new("<YOUR AUTH TOKEN>"); let client = s2::Client::new(config); let basins = client.list_basins(Default::default()).await?; println!("My basins: {:?}", basins);
See documentation for the client module for more information on how to
use the client, and what requests can be made.
§Examples
We have curated a bunch of examples in the SDK repository demonstrating how to use the SDK effectively:
- List all basins
- Explicit stream trimming
- Producer (with concurrency control)
- Consumer
- and many more…
This documentation is generated using
rustdoc-scrape-examples,
so you will be able to see snippets from examples right here in the
documentation.
§Feedback
We use Github Issues to track feature requests and issues with the SDK. If you wish to provide feedback, report a bug or request a feature, feel free to open a Github issue.
§Quick Links
Re-exports§
pub use client::BasinClient;Deprecated pub use client::Client;Deprecated pub use client::ClientConfig;Deprecated pub use client::StreamClient;Deprecated
Modules§
- batching
Deprecated - Append records batching stream.
- client
Deprecated - SDK client implementation.
- types
Deprecated - Types for interacting with S2 services.
Type Aliases§
- Streaming
Deprecated - Generic type for streaming response.