Improve comments for http_server
This commit is contained in:
parent
255590ef3b
commit
3a65f84b12
@ -11,6 +11,7 @@ use router::Router;
|
|||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
/// Yields a handler for the HTTP API.
|
||||||
pub fn build_handler<T: BeaconChainTypes + 'static>(
|
pub fn build_handler<T: BeaconChainTypes + 'static>(
|
||||||
beacon_chain: Arc<BeaconChain<T>>,
|
beacon_chain: Arc<BeaconChain<T>>,
|
||||||
) -> impl Handler {
|
) -> impl Handler {
|
||||||
|
@ -87,7 +87,7 @@ pub fn start_service<T: BeaconChainTypes + 'static>(
|
|||||||
info!(log, "HTTP server shutting down");
|
info!(log, "HTTP server shutting down");
|
||||||
|
|
||||||
if let Ok(mut server) = server_start_result {
|
if let Ok(mut server) = server_start_result {
|
||||||
// According to the documentation, this function "doesn't work" and the server
|
// According to the documentation, `server.close()` "doesn't work" and the server
|
||||||
// keeps listening.
|
// keeps listening.
|
||||||
//
|
//
|
||||||
// It is being called anyway, because it seems like the right thing to do. If you
|
// It is being called anyway, because it seems like the right thing to do. If you
|
||||||
|
@ -8,6 +8,7 @@ use slot_clock::SlotClock;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use types::Slot;
|
use types::Slot;
|
||||||
|
|
||||||
|
/// Yields a handler for the metrics endpoint.
|
||||||
pub fn build_handler<T: BeaconChainTypes + 'static>(
|
pub fn build_handler<T: BeaconChainTypes + 'static>(
|
||||||
beacon_chain: Arc<BeaconChain<T>>,
|
beacon_chain: Arc<BeaconChain<T>>,
|
||||||
) -> impl Handler {
|
) -> impl Handler {
|
||||||
|
Loading…
Reference in New Issue
Block a user