MCPcopy Create free account
hub / github.com/aws/clock-bound / run

Method run

clock-bound/src/daemon.rs:175–216  ·  view source on GitHub ↗

Run the daemon

(mut self: Box<Self>)

Source from the content-addressed store, hash-verified

173 rx,
174 clock_disruption_receiver.clone(),
175 clock_state_cancellation_token.clone(),
176 vmclock_params,
177 ClockStatus::Unknown,
178 );
179 (tx, clock_state)
180 };
181 let task_tracker = TaskTracker::new();
182 let clock_state_handle = ClockStateHandle {
183 clock_state: Some(clock_state),
184 tx: clock_state_tx,
185 cancellation_token: clock_state_cancellation_token,
186 task_tracker,
187 };
188
189 Self {
190 io_front_end,
191 clock_sync_algorithm,
192 receiver_stream,
193 clock_disruption_receiver,
194 cancellation_token,
195 clock_state_handle,
196 dns_message_rx,
197 configured_sources,
198 }
199 }
200
201 /// Install the NTP sources from the configuration file into the daemon.
202 ///
203 /// Each configured source maps onto a `SourceMutator` action:
204 /// - a `server` given as an IP is pinned as a fixed-address NTP source,
205 /// - a `server` given as a name is added as a single-host DNS-backed source,
206 /// - a `pool` is added as a multi-source DNS-backed pool.
207 fn install_configured_sources(
208 source_mutator: &mut SourceMutator<'_>,
209 configured_sources: &SourcesConfig,
210 ) {
211 for configured_source in configured_sources.ntp() {
212 match configured_source {
213 config::NtpSource::Server(Host::Ip(ip)) => {
214 source_mutator.add_ntp_source(SocketAddr::new(*ip, 123), MAX_DISPERSION_GROWTH);
215 }
216 config::NtpSource::Server(Host::Domain(d)) => {
217 source_mutator.add_domain_host(d.to_string());
218 }
219 config::NtpSource::Pool(d) => {

Callers

nothing calls this directly

Calls 2

init_reproMethod · 0.80
spawn_allMethod · 0.80

Tested by

no test coverage detected