Skip to content

Commit b444733

Browse files
committed
Added transitive closure of exposed API.
1 parent 0edf23c commit b444733

File tree

4 files changed

+40
-10
lines changed

4 files changed

+40
-10
lines changed

server/swimos_server_app/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ mod util;
6161

6262
pub use self::{
6363
config::{RemoteConnectionsConfig, SwimServerConfig},
64-
server::{BoxServer, Server, ServerBuilder, ServerHandle},
64+
server::{BoxServer, Server, ServerBuilder, ServerHandle, UnresolvableRoute},
6565
util::AgentExt,
6666
};
6767

6868
pub use error::{AmbiguousRoutes, ServerBuilderError, ServerError};
69-
pub use ratchet::deflate::DeflateConfig;
69+
pub use ratchet::deflate::{DeflateConfig, WindowBits};
7070
pub use swimos_introspection::IntrospectionConfig;
7171
use swimos_utilities::byte_channel::{ByteReader, ByteWriter};
7272

server/swimos_server_app/src/server/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ mod runtime;
2424
mod store;
2525

2626
pub use builder::ServerBuilder;
27-
27+
pub use error::UnresolvableRoute;
2828
use tokio::sync::{mpsc, oneshot};
2929

3030
use crate::error::ServerError;
3131

32-
use self::{error::UnresolvableRoute, runtime::StartAgentRequest};
32+
use self::runtime::StartAgentRequest;
3333

3434
/// A handle used to interact with a running Swim server instance. This can be used to find the interface
3535
/// on which the server is listening, instruct the server to stop and explicitly start agents.

swimos/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ swimos_recon = { path = "../api/formats/swimos_recon" }
1919
swimos_server_app = { path = "../server/swimos_server_app", optional = true }
2020
swimos_agent = { path = "../server/swimos_agent", optional = true }
2121
swimos_agent_derive = { path = "../server/swimos_agent_derive", optional = true }
22+
swimos_remote = { path = "../runtime/swimos_remote" }
2223

2324
[dev-dependencies]
2425
parking_lot = { workspace = true }

swimos/src/lib.rs

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,37 @@
1515
#[doc(inline)]
1616
pub use swimos_model as model;
1717

18+
/// Defines the low level API for implementing Swim agents.
1819
pub mod api {
1920
pub use swimos_api::agent::{Agent, DownlinkKind, UplinkKind};
2021
pub use swimos_utilities::handlers::NoHandler;
21-
22+
23+
pub mod address {
24+
pub use swimos_api::address::{Address, RelativeAddress};
25+
}
26+
27+
/// Error
2228
pub mod error {
23-
pub use swimos_api::error::{AgentInitError, AgentRuntimeError, AgentTaskError};
24-
pub use swimos_api::error::DownlinkTaskError;
29+
pub use swimos_api::error::{
30+
AgentInitError, AgentRuntimeError, AgentTaskError, DownlinkFailureReason,
31+
DownlinkRuntimeError, DownlinkTaskError, NodeIntrospectionError, OpenStoreError,
32+
StoreError,
33+
};
2534
}
2635

2736
pub mod agent {
2837
pub use swimos_api::agent::{
29-
AgentConfig, AgentContext, AgentInitResult, AgentTask, BoxAgent, LaneConfig,
38+
AgentConfig, AgentContext, AgentInitResult, AgentTask, BoxAgent, DownlinkKind,
39+
LaneConfig, StoreKind, WarpLaneKind,
3040
};
3141

3242
#[cfg(feature = "server")]
3343
pub use swimos_server_app::AgentExt;
3444
}
45+
}
3546

47+
pub mod utilities {
48+
pub use swimos_utilities::future::{Quantity, RetryStrategy};
3649
}
3750

3851
pub mod route {
@@ -48,15 +61,31 @@ pub mod io {
4861
}
4962
pub mod errors {
5063
pub use swimos_api::error::{FrameIoError, InvalidFrame};
51-
pub use swimos_recon::parser::AsyncParseError;
64+
pub use swimos_recon::parser::{AsyncParseError, ParseError};
5265
}
5366
}
5467

5568
#[cfg(feature = "server")]
5669
pub mod server {
5770
pub use swimos_server_app::{
58-
BoxServer, DeflateConfig, RemoteConnectionsConfig, Server, ServerBuilder, ServerHandle,
71+
BoxServer, DeflateConfig, IntrospectionConfig, RemoteConnectionsConfig, Server,
72+
ServerBuilder, ServerHandle, WindowBits,
5973
};
74+
75+
pub mod tls {
76+
pub use swimos_remote::tls::{
77+
CertChain, CertFormat, CertificateFile, ClientConfig, PrivateKey, ServerConfig,
78+
TlsConfig,
79+
};
80+
}
81+
82+
pub mod errors {
83+
pub use swimos_remote::tls::TlsError;
84+
pub use swimos_remote::ConnectionError;
85+
pub use swimos_server_app::{
86+
AmbiguousRoutes, ServerBuilderError, ServerError, UnresolvableRoute,
87+
};
88+
}
6089
}
6190

6291
#[cfg(feature = "agent")]

0 commit comments

Comments
 (0)