Lifetime and egress
How long a Space lives and which destinations it may reach, set after it exists.
set_lifetime gives a Space an end (deleted or suspended then), enforced by the daemon whether or not the client still runs. set_egress replaces its egress policy (EgressPolicy).
Lifetime and egress#
Methods of Spaces.
Spaces.set_lifetime#
Gives a Space a lifetime of seconds from now, replacing any earlier
one: when it passes, the cua daemon deletes the Space (on_expire
"delete", the default) or turns it off ("suspend"), whether or
not this process is still running. Works for a Space on this machine
or one of your machines. Returns when it ends (Unix seconds).
Embedded: recorded; the cua daemon on this machine enforces it.
async def set_lifetime(self, space: str, seconds: int, on_expire: Optional[str]) -> int| Parameter | Type | Default |
|---|---|---|
space | String | required |
seconds | u64 | required |
on_expire | Option<String> | required |
Returns i64 · Async · Raises CuaError
Spaces.set_egress#
Replaces a Space's egress policy; an empty one removes it (see
EgressPolicy). Its host enforces it at once. A bad entry is
InvalidArgument, a Space that cannot take one Unsupported.
async def set_egress(self, space: str, policy: EgressPolicy) -> None| Parameter | Type | Default |
|---|---|---|
space | String | required |
policy | EgressPolicy | required |
Async · Raises CuaError (InvalidArgument, Unsupported)