Skip to main content

Manager

Struct Manager 

Source
pub struct Manager { /* private fields */ }
Expand description

The ingress: keeps Caddy’s config in line with the stacks.

Implementations§

Source§

impl Manager

Source

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.

Source

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.

Source

pub fn extra_status(&self, r: &Route) -> Vec<DomainStatus>

An extra route’s state, as stack_status reports a domain’s.

Source§

impl Manager

Source

pub fn status(&self, orgs: Option<&[OrgId]>) -> Value

Everything the ingress_status tool shows, for the given orgs (all when None).

Source§

impl Manager

Source

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.

Source

pub fn start(self: &Arc<Self>, ctl: Controller) -> Result<()>

Get Caddy (downloading the pinned release if needed), start it, and start the applier.

Source

pub fn public_ip(&self) -> Option<IpAddr>

The address generated (host: auto) names point at.

Source

pub fn shutdown(&self)

Source

pub fn check(&self, def: &StackDef) -> Result<()>

Check a stack about to be deployed: its domains must be allowed for its org and free of other orgs’ (and other services’) claims.

Trait Implementations§

Source§

impl Observer for Manager

Source§

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)

Wait (at most timeout) until requests to ip have drained from the observer’s proxies, before the replica is stopped.
Source§

fn stacks_changed(&self, defs: Vec<Arc<StackDef>>)

The deployed definitions changed (deploy, scale, rollback, removal).
Source§

fn domains(&self, stack: &str, service: &str) -> Vec<DomainStatus>

A service’s domains for its status.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V