Skip to content

Commit

Permalink
chore: endpoints re-rejig (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
shikhar authored Nov 20, 2024
1 parent 2332405 commit 00bbdd2
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 233 deletions.
8 changes: 2 additions & 6 deletions examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::Duration;
use futures::StreamExt;
use streamstore::{
batching::AppendRecordsBatchingStream,
client::{Client, ClientConfig, ClientError, S2Endpoints},
client::{Client, ClientConfig, ClientError},
types::{
AppendInput, AppendRecord, AppendRecordBatch, BasinName, CreateBasinRequest,
CreateStreamRequest, DeleteBasinRequest, DeleteStreamRequest, ListBasinsRequest,
Expand All @@ -15,11 +15,7 @@ use streamstore::{
async fn main() {
let token = std::env::var("S2_AUTH_TOKEN").unwrap();

let endpoints = S2Endpoints::from_env().unwrap();

let config = ClientConfig::new(token)
.with_endpoints(endpoints)
.with_request_timeout(Duration::from_secs(10));
let config = ClientConfig::new(token).with_request_timeout(Duration::from_secs(10));

println!("Connecting with {config:#?}");

Expand Down
Loading

0 comments on commit 00bbdd2

Please sign in to comment.