Skip to content

Commit

Permalink
chore: example from_env
Browse files Browse the repository at this point in the history
  • Loading branch information
shikhar committed Nov 21, 2024
1 parent 188e046 commit a69a608
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/basic.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::time::Duration;

use futures::StreamExt;
use streamstore::{
batching::AppendRecordsBatchingStream,
client::{Client, ClientConfig, ClientError},
client::{Client, ClientConfig, ClientError, S2Endpoints},
types::{
AppendInput, AppendRecord, AppendRecordBatch, BasinName, CreateBasinRequest,
CreateStreamRequest, DeleteBasinRequest, DeleteStreamRequest, ListBasinsRequest,
Expand All @@ -15,7 +13,7 @@ use streamstore::{
async fn main() {
let token = std::env::var("S2_AUTH_TOKEN").unwrap();

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

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

Expand Down

0 comments on commit a69a608

Please sign in to comment.