Skip to content

Commit

Permalink
feat: Re-export client
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmanjiro13 committed Jan 9, 2023
1 parent 02d2203 commit b934d09
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tokio-fluent = "0.2.1"
```rust
use std::collections::HashMap;

use tokio_fluent::client::{Client, Config, FluentClient};
use tokio_fluent::{Client, Config, FluentClient};
use tokio_fluent::record::{Map, Value};
use tokio_fluent::record_map;

Expand Down Expand Up @@ -80,4 +80,4 @@ The default is 500.
### MaxRetry

Sets the maximum number of retries.
If the number of retries become larger than this value, the write/send operation will fail. The default is 13.
If the number of retries become larger than this value, the write/send operation will fail. The default is 5.
4 changes: 2 additions & 2 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! ## Example
//!
//! ```no_run
//! use tokio_fluent::client::{Client, Config, FluentClient};
//! use tokio_fluent::{Client, Config, FluentClient};
//! use tokio_fluent::record::{Map, Value};
//!
//! #[tokio::main]
Expand Down Expand Up @@ -76,7 +76,7 @@ impl Default for Config {
addr: "127.0.0.1:24224".parse().unwrap(),
timeout: Duration::new(3, 0),
retry_wait: 500,
max_retry: 13,
max_retry: 5,
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! use std::collections::HashMap;
//!
//! use tokio_fluent::record_map;
//! use tokio_fluent::client::{Client, Config, FluentClient};
//! use tokio_fluent::{Client, Config, FluentClient};
//! use tokio_fluent::record::{Map, Value};
//!
//! #[tokio::main]
Expand Down Expand Up @@ -34,3 +34,5 @@
pub mod client;
pub mod record;
mod worker;

pub use client::{Client, Config, FluentClient};

0 comments on commit b934d09

Please sign in to comment.