12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+ use std:: time:: Duration ;
15
16
use std:: { marker:: PhantomData , num:: NonZeroUsize , sync:: Arc } ;
16
17
17
18
use futures_util:: future:: BoxFuture ;
@@ -20,13 +21,8 @@ use ratchet::{
20
21
WebSocketStream ,
21
22
} ;
22
23
use rustls:: crypto:: CryptoProvider ;
23
- use tokio:: { sync:: mpsc, sync:: mpsc:: error:: SendError , sync:: oneshot:: error:: RecvError } ;
24
- pub use url:: Url ;
25
24
26
- use runtime:: {
27
- start_runtime, ClientConfig , DownlinkRuntimeError , RawHandle , Transport , WebSocketConfig ,
28
- } ;
29
- pub use runtime:: { CommandError , Commander , RemotePath } ;
25
+ pub use commander:: { CommandError , Commander } ;
30
26
pub use swimos_client_api:: DownlinkConfig ;
31
27
pub use swimos_downlink:: {
32
28
lifecycle:: BasicEventDownlinkLifecycle , lifecycle:: BasicMapDownlinkLifecycle ,
@@ -38,33 +34,22 @@ use swimos_downlink::{
38
34
MapValue , NotYetSyncedError , ValueDownlinkModel , ValueDownlinkSet ,
39
35
} ;
40
36
use swimos_form:: Form ;
41
- pub use swimos_remote:: tls:: ClientConfig as TlsConfig ;
42
- use swimos_remote:: tls:: TlsError ;
43
- use swimos_remote:: {
44
- dns:: Resolver ,
45
- plain:: TokioPlainTextNetworking ,
46
- tls:: { CryptoProviderConfig , RustlsClientNetworking } ,
47
- websocket:: RatchetClient ,
48
- ClientConnections ,
49
- } ;
50
37
use swimos_remote:: {
51
38
dns:: Resolver ,
52
39
plain:: TokioPlainTextNetworking ,
40
+ tls:: CryptoProviderConfig ,
53
41
tls:: { ClientConfig as TlsConfig , RustlsClientNetworking , TlsError } ,
54
42
websocket:: RatchetClient ,
55
43
ClientConnections ,
56
44
} ;
57
45
use swimos_runtime:: downlink:: { DownlinkOptions , DownlinkRuntimeConfig } ;
58
- use swimos_utilities:: { trigger, trigger:: promise} ;
59
46
use swimos_utilities:: { non_zero_usize, trigger, trigger:: promise} ;
60
47
use tokio:: { sync:: mpsc, sync:: mpsc:: error:: SendError , sync:: oneshot:: error:: RecvError } ;
61
48
pub use url:: Url ;
62
49
63
50
pub use crate :: models:: RemotePath ;
64
51
use crate :: {
65
- error:: DownlinkRuntimeError ,
66
- runtime:: { start_runtime, RawHandle } ,
67
- transport:: Transport ,
52
+ error:: DownlinkRuntimeError , runtime:: start_runtime, runtime:: RawHandle , transport:: Transport ,
68
53
} ;
69
54
70
55
#[ cfg( test) ]
@@ -79,7 +64,6 @@ mod transport;
79
64
80
65
pub type DownlinkOperationResult < T > = Result < T , DownlinkRuntimeError > ;
81
66
82
- #[ derive( Default ) ]
83
67
const DEFAULT_BUFFER_SIZE : NonZeroUsize = non_zero_usize ! ( 32 ) ;
84
68
const DEFAULT_CLOSE_TIMEOUT : Duration = Duration :: from_secs ( 5 ) ;
85
69
0 commit comments