Skip to main content

Workspaces

Struct Workspaces 

Source
pub struct Workspaces {
    pub previews: Previews,
    /* private fields */
}
Expand description

The daemon’s workspaces.

Fields§

§previews: Previews

Published ports’ previews through isb.

Implementations§

Source§

impl Workspaces

Source

pub fn uses(&self, org: &OrgId, name: &str) -> bool

Whether any workspace of the org takes name.

Source

pub fn secret_changed(&self, org: &OrgId, name: &str) -> Vec<(String, String)>

A secret got a new value: write it into every running workspace of the org that takes it (/run/isb/secrets/NAME), and restart none of them, since a workspace restarts only with confirm: what already read the old value keeps it. Returns (workspace, what happened).

Source§

impl Workspaces

Source

pub fn new( state_dir: &Path, client: Client, secrets: Arc<Secrets>, recorder: Arc<Recorder>, port: u16, home_pool: Option<String>, home_root: Option<PathBuf>, ) -> Arc<Workspaces> ⓘ

Source

pub fn authenticate(&self, token: &str) -> Option<Principal>

The principal behind a workspace token, if it is one of ours.

Source

pub fn session(&self, project: &str, instance: &str) -> SessionGuard

Count a session on an instance while the guard lives.

Source

pub fn mark_active(&self, project: &str, instance: &str)

isb saw the instance used (exec, a terminal).

Source

pub fn last_seen(&self, project: &str, instance: &str) -> Option<u64>

The latest activity isb saw on an instance, if any.

Source

pub fn settings(&self, org: &OrgId) -> Result<Settings>

The org’s workspace settings.

Source

pub fn url(&self, org: &OrgId) -> Option<String>

http://<gateway>:<port>: where the org’s instances reach isb.

Source

pub fn set_serving( &self, l: Listener, registry: Arc<Registry>, healthz: Healthz, )

The listener config and registry the bridge listeners serve.

Source

pub fn shutdown(&self)

Stop every bridge listener.

Source

pub fn sessions(&self, org: &OrgId, w: &Workspace, running: bool) -> Sessions

Live sessions: web terminals through this daemon, and established SSH connections inside the machine.

Source

pub fn start(self: &Arc<Self>, ctl: Controller, local: LocalOrg)

Bridges, credential delivery after restarts, and the reaper, on a thread of their own.

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