Language support

Rustaceans, we have an official SDK for you!

Getting started

  1. Ensure you have tokio added as a dependency. The SDK relies on Tokio for executing async code.

    cargo add tokio --features full
    
  2. Add the streamstore dependency to your project:

    cargo add streamstore
    
  3. Generate an authentication token by logging onto the web console at s2.dev.

  4. Make a request using SDK client.

    #[tokio::main]
    async fn main() -> Result<(), Box<dyn std::error::Error>> {
        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);
    
        Ok(())
    }
    

Feature matrix

Features/SDKRustGoPython
Conveniences
Delete with “if exists”
Retryable idempotent requests
Creation idempotence with s2-request-token
Read session resumption
Append retries
Client configuration
Endpoints
Connection timeout
Request timeout
User agent
Append retry policy
Max append inflight bytes
Retry backoff duration
Max attempts (retries)
Append record batching
Number of records
Linger duration
Match sequence number auto-advance
Fencing token