#[non_exhaustive]pub struct Grant {
pub publish: Patterns,
pub subscribe: Patterns,
pub root: Option<String>,
pub expires: Option<SystemTime>,
pub revalidate: Option<Duration>,
pub tier: Option<String>,
pub peer: bool,
}Expand description
What a session may do, as the auth server answered.
A 2xx carrying one of these admits; anything else refuses. A grant that names
nothing is a refusal too, and one that asks to be revalidated must say when it
expires, so an outage always has a bound the server chose. validate
checks these once at the boundary.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.publish: PatternsPatterns the session may publish, relative to the root.
subscribe: PatternsPatterns the session may subscribe to, relative to the root.
root: Option<String>The path the patterns are relative to, replacing the dialed one. This is how a server aliases a slug to a canonical id. Absent means the dialed path.
expires: Option<SystemTime>When the session closes, as unix seconds.
revalidate: Option<Duration>How long until the relay asks again, in seconds.
tier: Option<String>An opaque label handed to stats, so traffic can be bucketed.
peer: boolThe session is a cluster peer (another relay): what it announces entered the cluster elsewhere, not here.