Skip to content

Commit 266a316

Browse files
committed
big cleanup
1 parent 984615f commit 266a316

14 files changed

Lines changed: 1189 additions & 71 deletions

File tree

.vale/styles/config/vocabularies/technical/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,4 @@ rss
256256
waker
257257
(non-?)?interruptible
258258
PR
259+
uninterrupible

lib/saluki-core/src/components/decoders/context.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,36 @@ impl DecoderContext {
4343
self.health_handle.take().expect("health handle already taken")
4444
}
4545

46-
/// Gets a reference to the topology context.
46+
/// Returns a reference to the topology context.
4747
pub fn topology_context(&self) -> &TopologyContext {
4848
&self.topology_context
4949
}
5050

51-
/// Gets a reference to the component context.
51+
/// Returns a reference to the component context.
5252
pub fn component_context(&self) -> &ComponentContext {
5353
&self.component_context
5454
}
5555

56-
/// Gets a reference to the component registry.
56+
/// Returns a reference to the component registry.
5757
pub fn component_registry(&mut self) -> &ComponentRegistry {
5858
&self.component_registry
5959
}
6060

61-
/// Gets a reference to the events dispatcher.
61+
/// Returns a reference to the events dispatcher.
6262
pub fn dispatcher(&self) -> &EventsDispatcher {
6363
&self.dispatcher
6464
}
6565

66-
/// Gets a mutable reference to the payloads consumer.
66+
/// Returns a mutable reference to the payloads consumer.
6767
pub fn payloads(&mut self) -> &mut PayloadsConsumer {
6868
&mut self.consumer
6969
}
7070

7171
/// Returns a spawner for supervised child tasks belonging to this component.
7272
///
73-
/// Children spawned through it have their lifecycle coupled to the component itself: if the
74-
/// component restarts, or the component's supervisor dies, its children are terminated too.
75-
pub fn spawn_handle(&self) -> &ComponentSpawner {
73+
/// All child tasks spawned through this mechanism are tied to the lifecycle of the component itself, such that
74+
/// they're automatically shutdown/stopped when the component is stopped during topology shutdown, etc.
75+
pub fn spawner(&self) -> &ComponentSpawner {
7676
&self.spawner
7777
}
7878
}

lib/saluki-core/src/components/destinations/context.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,38 @@ impl DestinationContext {
3434

3535
/// Consumes the health handle of this destination context.
3636
///
37-
/// ## Panics
37+
/// # Panics
3838
///
3939
/// Panics if the health handle has already been taken.
4040
pub fn take_health_handle(&mut self) -> Health {
4141
self.health_handle.take().expect("health handle already taken")
4242
}
4343

44-
/// Gets a reference to the topology context.
44+
/// Returns a reference to the topology context.
4545
pub fn topology_context(&self) -> &TopologyContext {
4646
&self.topology_context
4747
}
4848

49-
/// Gets a reference to the component context.
49+
/// Returns a reference to the component context.
5050
pub fn component_context(&self) -> &ComponentContext {
5151
&self.component_context
5252
}
5353

54-
/// Gets a reference to the component registry.
54+
/// Returns a reference to the component registry.
5555
pub fn component_registry(&mut self) -> &ComponentRegistry {
5656
&self.component_registry
5757
}
5858

59-
/// Gets a mutable reference to the events consumer.
59+
/// Returns a mutable reference to the events consumer.
6060
pub fn events(&mut self) -> &mut EventsConsumer {
6161
&mut self.consumer
6262
}
6363

6464
/// Returns a spawner for supervised child tasks belonging to this component.
6565
///
66-
/// Children spawned through it have their lifecycle coupled to the component itself: if the
67-
/// component restarts, or the component's supervisor dies, its children are terminated too.
68-
pub fn spawn_handle(&self) -> &ComponentSpawner {
66+
/// All child tasks spawned through this mechanism are tied to the lifecycle of the component itself, such that
67+
/// they're automatically shutdown/stopped when the component is stopped during topology shutdown, etc.
68+
pub fn spawner(&self) -> &ComponentSpawner {
6969
&self.spawner
7070
}
7171
}

lib/saluki-core/src/components/encoders/context.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,36 @@ impl EncoderContext {
4343
self.health_handle.take().expect("health handle already taken")
4444
}
4545

46-
/// Gets a reference to the topology context.
46+
/// Returns a reference to the topology context.
4747
pub fn topology_context(&self) -> &TopologyContext {
4848
&self.topology_context
4949
}
5050

51-
/// Gets a reference to the component context.
51+
/// Returns a reference to the component context.
5252
pub fn component_context(&self) -> &ComponentContext {
5353
&self.component_context
5454
}
5555

56-
/// Gets a reference to the component registry.
56+
/// Returns a reference to the component registry.
5757
pub fn component_registry(&mut self) -> &ComponentRegistry {
5858
&self.component_registry
5959
}
6060

61-
/// Gets a reference to the payloads dispatcher.
61+
/// Returns a reference to the payloads dispatcher.
6262
pub fn dispatcher(&self) -> &PayloadsDispatcher {
6363
&self.dispatcher
6464
}
6565

66-
/// Gets a mutable reference to the events consumer.
66+
/// Returns a mutable reference to the events consumer.
6767
pub fn events(&mut self) -> &mut EventsConsumer {
6868
&mut self.consumer
6969
}
7070

7171
/// Returns a spawner for supervised child tasks belonging to this component.
7272
///
73-
/// Children spawned through it have their lifecycle coupled to the component itself: if the
74-
/// component restarts, or the component's supervisor dies, its children are terminated too.
75-
pub fn spawn_handle(&self) -> &ComponentSpawner {
73+
/// All child tasks spawned through this mechanism are tied to the lifecycle of the component itself, such that
74+
/// they're automatically shutdown/stopped when the component is stopped during topology shutdown, etc.
75+
pub fn spawner(&self) -> &ComponentSpawner {
7676
&self.spawner
7777
}
7878
}

lib/saluki-core/src/components/forwarders/context.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,31 @@ impl ForwarderContext {
4141
self.health_handle.take().expect("health handle already taken")
4242
}
4343

44-
/// Gets a reference to the topology context.
44+
/// Returns a reference to the topology context.
4545
pub fn topology_context(&self) -> &TopologyContext {
4646
&self.topology_context
4747
}
4848

49-
/// Gets a reference to the component context.
49+
/// Returns a reference to the component context.
5050
pub fn component_context(&self) -> &ComponentContext {
5151
&self.component_context
5252
}
5353

54-
/// Gets a reference to the component registry.
54+
/// Returns a reference to the component registry.
5555
pub fn component_registry(&mut self) -> &ComponentRegistry {
5656
&self.component_registry
5757
}
5858

59-
/// Gets a mutable reference to the payloads consumer.
59+
/// Returns a mutable reference to the payloads consumer.
6060
pub fn payloads(&mut self) -> &mut PayloadsConsumer {
6161
&mut self.consumer
6262
}
6363

6464
/// Returns a spawner for supervised child tasks belonging to this component.
6565
///
66-
/// Children spawned through it have their lifecycle coupled to the component itself: if the
67-
/// component restarts, or the component's supervisor dies, its children are terminated too.
68-
pub fn spawn_handle(&self) -> &ComponentSpawner {
66+
/// All child tasks spawned through this mechanism are tied to the lifecycle of the component itself, such that
67+
/// they're automatically shutdown/stopped when the component is stopped during topology shutdown, etc.
68+
pub fn spawner(&self) -> &ComponentSpawner {
6969
&self.spawner
7070
}
7171
}

lib/saluki-core/src/components/relays/context.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,31 +70,31 @@ impl RelayContext {
7070
self.health_handle.take().expect("health handle already taken")
7171
}
7272

73-
/// Gets a reference to the topology context.
73+
/// Returns a reference to the topology context.
7474
pub fn topology_context(&self) -> &TopologyContext {
7575
&self.inner.topology_context
7676
}
7777

78-
/// Gets a reference to the component context.
78+
/// Returns a reference to the component context.
7979
pub fn component_context(&self) -> &ComponentContext {
8080
&self.inner.component_context
8181
}
8282

83-
/// Gets a reference to the component registry.
83+
/// Returns a reference to the component registry.
8484
pub fn component_registry(&self) -> &ComponentRegistry {
8585
&self.inner.component_registry
8686
}
8787

88-
/// Gets a reference to the payloads dispatcher.
88+
/// Returns a reference to the payloads dispatcher.
8989
pub fn dispatcher(&self) -> &PayloadsDispatcher {
9090
&self.inner.dispatcher
9191
}
9292

9393
/// Returns a spawner for supervised child tasks belonging to this component.
9494
///
95-
/// Children spawned through it have their lifecycle coupled to the component itself: if the
96-
/// component restarts, or the component's supervisor dies, its children are terminated too.
97-
pub fn spawn_handle(&self) -> &ComponentSpawner {
95+
/// All child tasks spawned through this mechanism are tied to the lifecycle of the component itself, such that
96+
/// they're automatically shutdown/stopped when the component is stopped during topology shutdown, etc.
97+
pub fn spawner(&self) -> &ComponentSpawner {
9898
&self.inner.spawner
9999
}
100100
}

lib/saluki-core/src/components/sources/context.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ impl SourceContext {
4646

4747
/// Installs the shutdown handle for this source context.
4848
///
49-
/// Called once by the runtime, before the component runs, with the shutdown signal of the
50-
/// component's dedicated supervisor.
49+
/// Called once by the runtime, before the component runs, with the shutdown signal of the component's dedicated
50+
/// supervisor.
5151
pub(crate) fn set_shutdown_handle(&mut self, shutdown_handle: ShutdownHandle) {
5252
self.shutdown_handle = Some(shutdown_handle);
5353
}
@@ -70,31 +70,31 @@ impl SourceContext {
7070
self.health_handle.take().expect("health handle already taken")
7171
}
7272

73-
/// Gets a reference to the topology context.
73+
/// Returns a reference to the topology context.
7474
pub fn topology_context(&self) -> &TopologyContext {
7575
&self.inner.topology_context
7676
}
7777

78-
/// Gets a reference to the component context.
78+
/// Returns a reference to the component context.
7979
pub fn component_context(&self) -> &ComponentContext {
8080
&self.inner.component_context
8181
}
8282

83-
/// Gets a reference to the component registry.
83+
/// Returns a reference to the component registry.
8484
pub fn component_registry(&self) -> &ComponentRegistry {
8585
&self.inner.component_registry
8686
}
8787

88-
/// Gets a reference to the events dispatcher.
88+
/// Returns a reference to the events dispatcher.
8989
pub fn dispatcher(&self) -> &EventsDispatcher {
9090
&self.inner.dispatcher
9191
}
9292

9393
/// Returns a spawner for supervised child tasks belonging to this component.
9494
///
95-
/// Children spawned through it have their lifecycle coupled to the component itself: if the
96-
/// component restarts, or the component's supervisor dies, its children are terminated too.
97-
pub fn spawn_handle(&self) -> &ComponentSpawner {
95+
/// All child tasks spawned through this mechanism are tied to the lifecycle of the component itself, such that
96+
/// they're automatically shutdown/stopped when the component is stopped during topology shutdown, etc.
97+
pub fn spawner(&self) -> &ComponentSpawner {
9898
&self.inner.spawner
9999
}
100100
}

0 commit comments

Comments
 (0)