pub struct SessionWake {
pub routine_url: Option<String>,
pub routine_bearer: Option<String>,
pub leader_sock: Option<PathBuf>,
pub leader_cwd: Option<String>,
}Expand description
Wake targets for one shell. Empty fields mean that trigger is off.
routine_bearer is kept only in memory and only attached when
routine_url is set. The caller fills it from the environment, never
from a literal in source.
Fields§
§routine_url: Option<String>Routine URL. None or empty skips the POST.
routine_bearer: Option<String>Bearer for the routine POST. None or empty sends no
Authorization header.
leader_sock: Option<PathBuf>Path of an already-running leader.sock. None skips ACP.
leader_cwd: Option<String>Working directory for session/load. None uses the env or cwd.
Implementations§
Source§impl SessionWake
impl SessionWake
Sourcepub fn web_host() -> Self
pub fn web_host() -> Self
Web machine client. The host injected ROUTINE_URL_ENV and, when
that URL is set, ROUTINE_BEARER_ENV. LEADER_SOCK_ENV is not
read. Nothing is taken from a file.
Sourcepub fn web_from_lookup(get: impl FnMut(&str) -> Option<String>) -> Self
pub fn web_from_lookup(get: impl FnMut(&str) -> Option<String>) -> Self
Same as Self::web_host with an explicit lookup. A leader socket
returned by get is ignored.
Sourcepub fn node_cli() -> Result<Self, ShellError>
pub fn node_cli() -> Result<Self, ShellError>
Node CLI. LEADER_SOCK_ENV and LEADER_CWD_ENV only. A routine
URL or bearer is refused. The refused value is not copied into the
error.
Sourcepub fn node_from_lookup(
get: impl FnMut(&str) -> Option<String>,
) -> Result<Self, ShellError>
pub fn node_from_lookup( get: impl FnMut(&str) -> Option<String>, ) -> Result<Self, ShellError>
Same as Self::node_cli with an explicit lookup.