Fix voldemort types in public interface

The `Fds` struct used in `ListenFds` in the `pingora::services::Service` trait
is not nameable. See https://rust-lang.github.io/rfcs/2145-type-privacy.html#~~~-voldemort-types-its-reachable-but-i-cant-name-it

This change makes both `ListenFds` and `Fds` public.

As a side-effect all of the methods on `Fds` are now public as well but are not documented.

Fixes: https://github.com/cloudflare/pingora/issues/145

Replicated-from: https://github.com/cloudflare/pingora/pull/146
Includes-commit: 6f835a357b
This commit is contained in:
Benjamin Halsted 2024-03-20 08:08:45 -07:00 committed by Andrew Hauck
parent d62826597b
commit b26d59983c
2 changed files with 3 additions and 3 deletions

2
.bleep
View file

@ -1 +1 @@
2a636fbebd25712838237b2e3489bd426edfb69c
fd3fecd31f8e2deb92e20412c3c4e018ec80be82

View file

@ -30,7 +30,7 @@ use tokio::time::{sleep, Duration};
use crate::services::Service;
use configuration::{Opt, ServerConf};
use transfer_fd::Fds;
pub use transfer_fd::Fds;
use pingora_error::{Error, ErrorType, Result};
@ -49,7 +49,7 @@ enum ShutdownType {
/// The receiver for server's shutdown event. The value will turn to true once the server starts
/// to shutdown
pub type ShutdownWatch = watch::Receiver<bool>;
pub(crate) type ListenFds = Arc<Mutex<Fds>>;
pub type ListenFds = Arc<Mutex<Fds>>;
/// The server object
///