pub struct Workspaces {
pub previews: Previews,
/* private fields */
}Expand description
The daemon’s workspaces.
Fields§
§previews: PreviewsPublished ports’ previews through isb.
Implementations§
Source§impl Workspaces
impl Workspaces
Sourcepub fn uses(&self, org: &OrgId, name: &str) -> bool
pub fn uses(&self, org: &OrgId, name: &str) -> bool
Whether any workspace of the org takes name.
Sourcepub fn secret_changed(&self, org: &OrgId, name: &str) -> Vec<(String, String)>
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
impl Workspaces
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> ⓘ
Sourcepub fn authenticate(&self, token: &str) -> Option<Principal>
pub fn authenticate(&self, token: &str) -> Option<Principal>
The principal behind a workspace token, if it is one of ours.
Sourcepub fn session(&self, project: &str, instance: &str) -> SessionGuard
pub fn session(&self, project: &str, instance: &str) -> SessionGuard
Count a session on an instance while the guard lives.
Sourcepub fn mark_active(&self, project: &str, instance: &str)
pub fn mark_active(&self, project: &str, instance: &str)
isb saw the instance used (exec, a terminal).
Sourcepub fn last_seen(&self, project: &str, instance: &str) -> Option<u64>
pub fn last_seen(&self, project: &str, instance: &str) -> Option<u64>
The latest activity isb saw on an instance, if any.
Sourcepub fn url(&self, org: &OrgId) -> Option<String>
pub fn url(&self, org: &OrgId) -> Option<String>
http://<gateway>:<port>: where the org’s instances reach isb.
Sourcepub fn set_serving(
&self,
l: Listener,
registry: Arc<Registry>,
healthz: Healthz,
)
pub fn set_serving( &self, l: Listener, registry: Arc<Registry>, healthz: Healthz, )
The listener config and registry the bridge listeners serve.
Sourcepub fn sessions(&self, org: &OrgId, w: &Workspace, running: bool) -> Sessions
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.
Sourcepub fn start(self: &Arc<Self>, ctl: Controller)
pub fn start(self: &Arc<Self>, ctl: Controller)
Bridges, credential delivery after restarts, and the reaper, on a thread of their own.