1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
use BoxFuture;
use DialTarget;
/// Common boxed error alias used throughout the `tonic` module.
/// Matches what `tower::Service` impls (including hyper) use, so
/// it propagates without wrapping.
pub type BoxError = ;
/// SF naming abstraction used by [`super::super::TargetConnector`].
/// Each call returns the concrete [`DialTarget`] the connector
/// should dial next.
///
/// The trait is intentionally minimal: one method, no arguments,
/// no associated types. The implementation owns everything between
/// "what does SF currently say about this partition?" and "where
/// do I actually open a TCP connection?":
/// - which Fabric URI to look up,
/// - which partition key,
/// - the `previousResult` cache and always-complain rule,
/// - the per-resolve timeout / cancellation policy,
/// - the role-pick + address-parse selector that turns an RSP
/// into a `DialTarget`.
///
/// Returning `DialTarget` (not `Arc<View>`) keeps the connector
/// non-generic. Custom resolvers that want different selection
/// logic implement the trait directly.
///
/// **v1 has no cancellation token on `resolve()`.** Per-call
/// cancellation works implicitly via future-drop.