util: rename tower-service-util -> tower-util (#212)
This commit is contained in:
parent
d968432183
commit
f1bb22a296
|
@ -14,9 +14,9 @@ members = [
|
|||
"tower-reconnect",
|
||||
"tower-retry",
|
||||
"tower-service",
|
||||
"tower-service-util",
|
||||
"tower-timeout",
|
||||
"tower-util",
|
||||
]
|
||||
|
||||
[patch.'https://github.com/tower-rs/tower']
|
||||
tower-retry = { path = "tower-retry" }
|
||||
tower-retry = { path = "tower-retry" }
|
||||
|
|
|
@ -60,7 +60,7 @@ crates.
|
|||
* [`tower-timeout`]: Middleware that applies a timeout to requests
|
||||
([docs][tt-docs]).
|
||||
|
||||
* [`tower-service-util`]: Miscellaneous additional utilities for Tower
|
||||
* [`tower-util`]: Miscellaneous additional utilities for Tower
|
||||
([docs][tu-docs]).
|
||||
|
||||
## Status
|
||||
|
@ -104,5 +104,5 @@ terms or conditions.
|
|||
[tretry-docs]: https://tower-rs.github.io/tower/doc/tower_retry/index.html
|
||||
[`tower-timeout`]: tower-timeout
|
||||
[tt-docs]: https://tower-rs.github.io/tower/doc/tower_timeout/index.html
|
||||
[`tower-service-util`]: tower-service-util
|
||||
[tu-docs]: https://tower-rs.github.io/tower/doc/tower_service_util/index.html
|
||||
[`tower-util`]: tower-util
|
||||
[tu-docs]: https://tower-rs.github.io/tower/doc/tower_util/index.html
|
||||
|
|
|
@ -11,7 +11,7 @@ rand = "0.6"
|
|||
tokio-timer = "0.2.4"
|
||||
tower-service = "0.2.0"
|
||||
tower-discover = { version = "0.1", path = "../tower-discover" }
|
||||
tower-service-util = { version = "0.1", path = "../tower-service-util" }
|
||||
tower-util = { version = "0.1", path = "../tower-util" }
|
||||
indexmap = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -9,7 +9,7 @@ extern crate rand;
|
|||
extern crate tokio_timer;
|
||||
extern crate tower_discover;
|
||||
extern crate tower_service;
|
||||
extern crate tower_service_util;
|
||||
extern crate tower_util;
|
||||
|
||||
use futures::{Async, Future, Poll};
|
||||
use indexmap::IndexMap;
|
||||
|
|
|
@ -18,7 +18,7 @@ use super::{Balance, Choose};
|
|||
use futures::{Async, Future, Poll};
|
||||
use tower_discover::{Change, Discover};
|
||||
use tower_service::Service;
|
||||
use tower_service_util::MakeService;
|
||||
use tower_util::MakeService;
|
||||
|
||||
enum Load {
|
||||
/// Load is low -- remove a service instance.
|
||||
|
|
|
@ -8,4 +8,4 @@ publish = false
|
|||
log = "0.4.1"
|
||||
futures = "0.1"
|
||||
tower-service = "0.2.0"
|
||||
tower-service-util = { version = "0.1", path = "../tower-service-util" }
|
||||
tower-util = { version = "0.1", path = "../tower-util" }
|
||||
|
|
|
@ -2,7 +2,7 @@ extern crate futures;
|
|||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate tower_service;
|
||||
extern crate tower_service_util;
|
||||
extern crate tower_util;
|
||||
|
||||
pub mod future;
|
||||
|
||||
|
@ -10,7 +10,7 @@ use crate::future::ResponseFuture;
|
|||
|
||||
use futures::{Async, Future, Poll};
|
||||
use tower_service::Service;
|
||||
use tower_service_util::MakeService;
|
||||
use tower_util::MakeService;
|
||||
|
||||
use std::fmt;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
|
||||
name = "tower-service-util"
|
||||
name = "tower-util"
|
||||
# When releasing to crates.io:
|
||||
# - Update html_root_url.
|
||||
# - Update CHANGELOG.md.
|
||||
|
@ -12,7 +12,7 @@ license = "MIT"
|
|||
readme = "README.md"
|
||||
repository = "https://github.com/tower-rs/tower"
|
||||
homepage = "https://github.com/tower-rs/tower"
|
||||
documentation = "https://docs.rs/tokio-service-util/0.1.0"
|
||||
documentation = "https://docs.rs/tokio-util/0.1.0"
|
||||
description = """
|
||||
Utilities for working with tower-service.
|
||||
"""
|
|
@ -16,11 +16,11 @@
|
|||
//! ```
|
||||
//! # extern crate futures;
|
||||
//! # extern crate tower_service;
|
||||
//! # extern crate tower_service_util;
|
||||
//! # extern crate tower_util;
|
||||
//! # use futures::*;
|
||||
//! # use futures::future::FutureResult;
|
||||
//! # use tower_service::Service;
|
||||
//! # use tower_service_util::BoxService;
|
||||
//! # use tower_util::BoxService;
|
||||
//! // Respond to requests using a closure. Since closures cannot be named,
|
||||
//! // `ServiceFn` cannot be named either
|
||||
//! pub struct ServiceFn<F> {
|
|
@ -3,7 +3,7 @@ extern crate tokio_mock_task;
|
|||
extern crate tower;
|
||||
extern crate tower_mock;
|
||||
extern crate tower_service;
|
||||
extern crate tower_service_util;
|
||||
extern crate tower_util;
|
||||
|
||||
use futures::future::{ok, FutureResult};
|
||||
use futures::stream;
|
|
@ -32,7 +32,7 @@ make_service = [
|
|||
[dependencies]
|
||||
futures = "0.1"
|
||||
tower-service = "0.2"
|
||||
tower-service-util = { version = "0.1.0", path = "../tower-service-util", features = ["io", "either"] }
|
||||
tower-util = { version = "0.1.0", path = "../tower-util", features = ["io", "either"] }
|
||||
tower-layer = { version = "0.1", path = "../tower-layer" }
|
||||
tower-in-flight-limit = { version = "0.1", path = "../tower-in-flight-limit", optional = true }
|
||||
tower-rate-limit = { version = "0.1", path = "../tower-rate-limit", optional = true }
|
||||
|
|
|
@ -9,7 +9,7 @@ use tower_layer::{
|
|||
Layer,
|
||||
};
|
||||
use tower_service::Service;
|
||||
use tower_service_util::MakeService;
|
||||
use tower_util::MakeService;
|
||||
|
||||
pub(super) type Error = Box<::std::error::Error + Send + Sync>;
|
||||
|
||||
|
@ -22,7 +22,7 @@ pub(super) type Error = Box<::std::error::Error + Send + Sync>;
|
|||
/// - A [`Service`](tower_service::Service) is a trait representing an asynchronous
|
||||
/// function of a request to a response. It is similar to
|
||||
/// `async fn(Request) -> Result<Response, Error>`.
|
||||
/// - A [`MakeService`](tower_service_util::MakeService) is a trait creating specific
|
||||
/// - A [`MakeService`](tower_util::MakeService) is a trait creating specific
|
||||
/// instances of a `Service`
|
||||
///
|
||||
/// # Service
|
||||
|
|
|
@ -3,7 +3,7 @@ use futures::{Async, Future, Poll};
|
|||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
use tower_layer::Layer;
|
||||
use tower_service_util::MakeService;
|
||||
use tower_util::MakeService;
|
||||
use Service;
|
||||
|
||||
/// Composed `MakeService` produced from `ServiceBuilder`
|
||||
|
|
|
@ -5,7 +5,7 @@ extern crate futures;
|
|||
|
||||
extern crate tower_layer;
|
||||
extern crate tower_service;
|
||||
extern crate tower_service_util;
|
||||
extern crate tower_util;
|
||||
|
||||
#[cfg(feature = "layers")]
|
||||
extern crate tower_buffer;
|
||||
|
@ -36,6 +36,6 @@ pub mod util;
|
|||
|
||||
pub use builder::ServiceBuilder;
|
||||
pub use tower_service::Service;
|
||||
pub use tower_service_util::MakeConnection;
|
||||
pub use tower_service_util::MakeService;
|
||||
pub use tower_util::MakeConnection;
|
||||
pub use tower_util::MakeService;
|
||||
pub use util::ServiceExt;
|
||||
|
|
|
@ -18,14 +18,14 @@ pub use self::oneshot::Oneshot;
|
|||
pub use self::ready::Ready;
|
||||
pub use self::then::Then;
|
||||
|
||||
// `tower-service-util` re-exports
|
||||
pub use tower_service_util::BoxService;
|
||||
pub use tower_service_util::CallAll;
|
||||
pub use tower_service_util::CallAllUnordered;
|
||||
pub use tower_service_util::EitherService;
|
||||
pub use tower_service_util::OptionService;
|
||||
pub use tower_service_util::ServiceFn;
|
||||
pub use tower_service_util::UnsyncBoxService;
|
||||
// `tower-util` re-exports
|
||||
pub use tower_util::BoxService;
|
||||
pub use tower_util::CallAll;
|
||||
pub use tower_util::CallAllUnordered;
|
||||
pub use tower_util::EitherService;
|
||||
pub use tower_util::OptionService;
|
||||
pub use tower_util::ServiceFn;
|
||||
pub use tower_util::UnsyncBoxService;
|
||||
|
||||
use futures::{IntoFuture, Stream};
|
||||
use tower_service::Service;
|
||||
|
|
Loading…
Reference in New Issue