Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
c7f8acd4
"...git@developer.sourcefind.cn:OpenDAS/mmgeneration.git" did not exist on "57e0e89170c8aa97b0980fafaf87b2df0204f93d"
Commit
c7f8acd4
authored
Feb 10, 2025
by
Graham King
Committed by
GitHub
Feb 10, 2025
Browse files
doc: Fix doc links (#149)
parent
ffc6dde1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
26 deletions
+19
-26
runtime/rust/src/component.rs
runtime/rust/src/component.rs
+10
-8
runtime/rust/src/discovery.rs
runtime/rust/src/discovery.rs
+1
-1
runtime/rust/src/pipeline/context.rs
runtime/rust/src/pipeline/context.rs
+1
-1
runtime/rust/src/pipeline/network.rs
runtime/rust/src/pipeline/network.rs
+1
-5
runtime/rust/src/pipeline/network/tcp/server.rs
runtime/rust/src/pipeline/network/tcp/server.rs
+1
-5
runtime/rust/src/pipeline/nodes.rs
runtime/rust/src/pipeline/nodes.rs
+2
-3
runtime/rust/src/runtime.rs
runtime/rust/src/runtime.rs
+2
-2
runtime/rust/src/worker.rs
runtime/rust/src/worker.rs
+1
-1
No files found.
runtime/rust/src/component.rs
View file @
c7f8acd4
...
@@ -15,14 +15,14 @@
...
@@ -15,14 +15,14 @@
//! The [Component] module defines the top-level API for building distributed applications.
//! The [Component] module defines the top-level API for building distributed applications.
//!
//!
//! A distributed application consists of a set of [Component]
[Component]
that can host one
//! A distributed application consists of a set of [Component] that can host one
//! or more [Endpoint]
[Endpoint]. Each [Endpoint]
[Endpoint] is a network-accessible service
//! or more [Endpoint]
. Each
[Endpoint] is a network-accessible service
//! that can be accessed by other [Component]
[Component]
in the distributed application.
//! that can be accessed by other [Component] in the distributed application.
//!
//!
//! A [Component] is made discoverable by registering it with the distributed runtime under
//! A [Component] is made discoverable by registering it with the distributed runtime under
//! a [`Namespace`].
//! a [`Namespace`].
//!
//!
//! A [`Namespace`] is a logical grouping of [Component]
[Component]
that are grouped together.
//! A [`Namespace`] is a logical grouping of [Component] that are grouped together.
//!
//!
//! We might extend namespace to include grouping behavior, which would define groups of
//! We might extend namespace to include grouping behavior, which would define groups of
//! components that are tightly coupled.
//! components that are tightly coupled.
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
//! which define how that component was constructed/configured and what capabilities it can
//! which define how that component was constructed/configured and what capabilities it can
//! provide.
//! provide.
//!
//!
//! Other [Component]
[Component]
can write to watching locations within a [Component] etcd
//! Other [Component] can write to watching locations within a [Component] etcd
//! path. This allows the [Component] to take dynamic actions depending on the watch
//! path. This allows the [Component] to take dynamic actions depending on the watch
//! triggers.
//! triggers.
//!
//!
...
@@ -85,8 +85,8 @@ pub struct ComponentEndpointInfo {
...
@@ -85,8 +85,8 @@ pub struct ComponentEndpointInfo {
}
}
/// A [Component] a discoverable entity in the distributed runtime.
/// A [Component] a discoverable entity in the distributed runtime.
/// You can host [Endpoint]
[Endpoint]
on a [Component] by first creating
/// You can host [Endpoint] on a [Component] by first creating
/// a [Service] then adding one or more [Endpoint]
[Endpoint]
to the [Service].
/// a [Service] then adding one or more [Endpoint] to the [Service].
///
///
/// You can also issue a request to a [Component]'s [Endpoint] by creating a [Client].
/// You can also issue a request to a [Component]'s [Endpoint] by creating a [Client].
#[derive(Educe,
Builder,
Clone)]
#[derive(Educe,
Builder,
Clone)]
...
@@ -130,8 +130,10 @@ impl Component {
...
@@ -130,8 +130,10 @@ impl Component {
unimplemented!
(
"endpoints"
)
unimplemented!
(
"endpoints"
)
}
}
/// TODO
///
/// This method will scrape the stats for all available services
/// This method will scrape the stats for all available services
/// Returns a stream of
[
`ServiceInfo`
]
objects.
/// Returns a stream of `ServiceInfo` objects.
/// This should be consumed by a `[tokio::time::timeout_at`] because each services
/// This should be consumed by a `[tokio::time::timeout_at`] because each services
/// will only respond once, but there is no way to know when all services have responded.
/// will only respond once, but there is no way to know when all services have responded.
pub
async
fn
stats_stream
(
&
self
)
->
Result
<
()
>
{
pub
async
fn
stats_stream
(
&
self
)
->
Result
<
()
>
{
...
...
runtime/rust/src/discovery.rs
View file @
c7f8acd4
...
@@ -44,7 +44,7 @@ impl DiscoveryClient {
...
@@ -44,7 +44,7 @@ impl DiscoveryClient {
}
}
/// Create a [`Lease`] with a given time-to-live (TTL).
/// Create a [`Lease`] with a given time-to-live (TTL).
/// This [`Lease`] will be tied to the [`Runtime`], but has its own independent [`crate::CancellationToken`].
/// This [`Lease`] will be tied to the [`
crate::
Runtime`], but has its own independent [`crate::CancellationToken`].
pub
async
fn
create_lease
(
&
self
,
ttl
:
i64
)
->
Result
<
Lease
>
{
pub
async
fn
create_lease
(
&
self
,
ttl
:
i64
)
->
Result
<
Lease
>
{
self
.etcd_client
.create_lease
(
ttl
)
.await
self
.etcd_client
.create_lease
(
ttl
)
.await
}
}
...
...
runtime/rust/src/pipeline/context.rs
View file @
c7f8acd4
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
//! There are two context object defined in this module:
//! There are two context object defined in this module:
//!
//!
//! - [`Context`] is an input context which is propagated through the processing pipeline,
//! - [`Context`] is an input context which is propagated through the processing pipeline,
//! up to the point where the input is pass to an [`
triton_distribu
te
d
::engine::AsyncEngine`] for processing.
//! up to the point where the input is pass to an [`
cra
te::engine::AsyncEngine`] for processing.
//! - [`StreamContext`] is the input context transformed into to a type erased context that maintains the inputs
//! - [`StreamContext`] is the input context transformed into to a type erased context that maintains the inputs
//! registry and visitors. `StreamAdaptors` will amend themselves to the [`StreamContext`] to allow for the
//! registry and visitors. `StreamAdaptors` will amend themselves to the [`StreamContext`] to allow for the
...
...
runtime/rust/src/pipeline/network.rs
View file @
c7f8acd4
...
@@ -105,11 +105,7 @@ impl PendingConnections {
...
@@ -105,11 +105,7 @@ impl PendingConnections {
}
}
/// A [`ResponseService`] implements a services in which a context a specific subject with will
/// A [`ResponseService`] implements a services in which a context a specific subject with will
/// be associated with a stream of responses. The key difference between a [`ResponseService`]
/// be associated with a stream of responses.
/// and a [`RequestService`] is that the [`ResponseService`] is the awaits an explicit connection
/// to be established, where as a [`RequestService`] has no known knowledge about incoming
/// connections. All [`ResponseService`] connections are expected, all [`RequestService`] connections
/// are unexpected.
#[async_trait::async_trait]
#[async_trait::async_trait]
pub
trait
ResponseService
{
pub
trait
ResponseService
{
async
fn
register
(
&
self
,
options
:
StreamOptions
)
->
PendingConnections
;
async
fn
register
(
&
self
,
options
:
StreamOptions
)
->
PendingConnections
;
...
...
runtime/rust/src/pipeline/network/tcp/server.rs
View file @
c7f8acd4
...
@@ -61,13 +61,9 @@ impl ServerOptions {
...
@@ -61,13 +61,9 @@ impl ServerOptions {
}
}
}
}
// todo - rename TcpResponseServer
// we may need to disambiguate this and a TcpRequestServer
/// A [`TcpStreamServer`] is a TCP service that listens on a port for incoming response connections.
/// A [`TcpStreamServer`] is a TCP service that listens on a port for incoming response connections.
/// A Response connection is a connection that is established by a client with the intention of sending
/// A Response connection is a connection that is established by a client with the intention of sending
/// specific data back to the server. The key differentiating factor is that a [`ResponseServer`] is
/// specific data back to the server.
/// expecting a connection from a client with an established subject.
pub
struct
TcpStreamServer
{
pub
struct
TcpStreamServer
{
local_ip
:
String
,
local_ip
:
String
,
local_port
:
u16
,
local_port
:
u16
,
...
...
runtime/rust/src/pipeline/nodes.rs
View file @
c7f8acd4
...
@@ -67,8 +67,7 @@ mod private {
...
@@ -67,8 +67,7 @@ mod private {
}
}
// todo rename `ServicePipelineExt`
// todo rename `ServicePipelineExt`
/// A [`Source`] trait defines how data is emitted from a source to a downstream sink
/// A [`Source`] trait defines how data is emitted from a source to a downstream sink.
/// over an [`Edge`].
#[async_trait]
#[async_trait]
pub
trait
Source
<
T
:
PipelineIO
>
:
Data
{
pub
trait
Source
<
T
:
PipelineIO
>
:
Data
{
async
fn
on_next
(
&
self
,
data
:
T
,
_
:
private
::
Token
)
->
Result
<
(),
Error
>
;
async
fn
on_next
(
&
self
,
data
:
T
,
_
:
private
::
Token
)
->
Result
<
(),
Error
>
;
...
@@ -88,7 +87,7 @@ pub trait Sink<T: PipelineIO>: Data {
...
@@ -88,7 +87,7 @@ pub trait Sink<T: PipelineIO>: Data {
async
fn
on_data
(
&
self
,
data
:
T
,
_
:
private
::
Token
)
->
Result
<
(),
Error
>
;
async
fn
on_data
(
&
self
,
data
:
T
,
_
:
private
::
Token
)
->
Result
<
(),
Error
>
;
}
}
/// An [`Edge`] is a connection between a [`Source`] and a [`Sink`].
Data flows over an [`Edge`].
/// An [`Edge`] is a connection between a [`Source`] and a [`Sink`].
pub
struct
Edge
<
T
:
PipelineIO
>
{
pub
struct
Edge
<
T
:
PipelineIO
>
{
downstream
:
Arc
<
dyn
Sink
<
T
>>
,
downstream
:
Arc
<
dyn
Sink
<
T
>>
,
}
}
...
...
runtime/rust/src/runtime.rs
View file @
c7f8acd4
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// See the License for the specific language governing permissions and
// limitations under the License.
// limitations under the License.
//! The [Runtime] module is the interface for [crate::component::Component]
[crate::component::Component]
//! The [Runtime] module is the interface for [crate::component::Component]
//! to access shared resources. These include thread pool, memory allocators and other shared resources.
//! to access shared resources. These include thread pool, memory allocators and other shared resources.
//!
//!
//! The [Runtime] holds the primary [`CancellationToken`] which can be used to terminate all attached
//! The [Runtime] holds the primary [`CancellationToken`] which can be used to terminate all attached
//! [crate::component::Component
][crate::component::Component
].
//! [
`
crate::component::Component
`
].
//!
//!
//! We expect in the future to offer topologically aware thread and memory resources, but for now the
//! We expect in the future to offer topologically aware thread and memory resources, but for now the
//! set of resources is limited to the thread pool and cancellation token.
//! set of resources is limited to the thread pool and cancellation token.
...
...
runtime/rust/src/worker.rs
View file @
c7f8acd4
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
//!
//!
//! In the future, the [Worker] should probably be moved to a procedural macro similar
//! In the future, the [Worker] should probably be moved to a procedural macro similar
//! to the `#[tokio::main]` attribute, where we might annotate an async main function with
//! to the `#[tokio::main]` attribute, where we might annotate an async main function with
//! #[triton::main] or similar.
//!
`
#[triton::main]
`
or similar.
//!
//!
//! The [Worker::execute] method is designed to be called once from main and will block
//! The [Worker::execute] method is designed to be called once from main and will block
//! the calling thread until the application completes or is canceled. The method initialized
//! the calling thread until the application completes or is canceled. The method initialized
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment