pub struct Manager { /* private fields */ }Expand description
The ingress: keeps Caddy’s config in line with the stacks.
Implementations§
Source§impl Manager
impl Manager
Sourcepub fn set_extras(&self, extras: Vec<ExtraRoute>)
pub fn set_extras(&self, extras: Vec<ExtraRoute>)
Replace the extra routes: one caller (the daemon’s workspaces) owns them all. Caddy is reloaded only when they changed.
Sourcepub fn check_extra(&self, r: &Route) -> Result<()>
pub fn check_extra(&self, r: &Route) -> Result<()>
Check a new extra route before it is kept: the org’s allowlist and provider, and no other claim on its name.
Sourcepub fn extra_status(&self, r: &Route) -> Vec<DomainStatus>
pub fn extra_status(&self, r: &Route) -> Vec<DomainStatus>
An extra route’s state, as stack_status reports a domain’s.
Source§impl Manager
impl Manager
Sourcepub fn new(
cfg: IngressConfig,
client: Client,
secrets: Arc<Secrets>,
state_dir: &Path,
) -> Result<Arc<Manager>>
pub fn new( cfg: IngressConfig, client: Client, secrets: Arc<Secrets>, state_dir: &Path, ) -> Result<Arc<Manager>>
Create the manager. Caddy starts with Manager::start, once the
controller exists.
Sourcepub fn start(self: &Arc<Self>, ctl: Controller) -> Result<()>
pub fn start(self: &Arc<Self>, ctl: Controller) -> Result<()>
Get Caddy (downloading the pinned release if needed), start it, and start the applier.
pub fn shutdown(&self)
Trait Implementations§
Source§impl Observer for Manager
impl Observer for Manager
Source§fn rotation(&self, stack: &str, service: &str, ips: &[IpAddr])
fn rotation(&self, stack: &str, service: &str, ips: &[IpAddr])
The in-rotation replicas of a service changed.
stack is qualified.Source§fn drain(&self, stack: &str, service: &str, ip: IpAddr, timeout: Duration)
fn drain(&self, stack: &str, service: &str, ip: IpAddr, timeout: Duration)
Wait (at most
timeout) until requests to ip have drained from the
observer’s proxies, before the replica is stopped.Auto Trait Implementations§
impl !Freeze for Manager
impl !RefUnwindSafe for Manager
impl !UnwindSafe for Manager
impl Send for Manager
impl Sync for Manager
impl Unpin for Manager
impl UnsafeUnpin for Manager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more