pub struct LiveTeam {
pub members: Vec<Live>,
pub poll_seconds: i64,
pub stale_after_seconds: i64,
}Expand description
What the team is doing right now: GET /api/v1/team/live.
Its own endpoint rather than a field on /team/days, because the two are
asked at completely different rates. The week’s hours are a page load; the
pulse is a poll every half minute, and answering it with the week’s totals
would make the dashboard re-run the heaviest query on the server on a timer
- for numbers that did not change.
Keyed by user id so the caller merges it into the table it already drew.
Nothing here identifies a person beyond that id: the row a manager may see
was decided by /team/days, and this endpoint applies the same clause
rather than a second reading of it.
Fields§
§members: Vec<Live>§poll_seconds: i64How often the caller should ask again, in seconds. The server owns the cadence - it is the side that knows the staleness threshold.
stale_after_seconds: i64After how many seconds of silence a pulse stops being believed, so the UI can explain “offline” with the same number the server used.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveTeam
impl RefUnwindSafe for LiveTeam
impl Send for LiveTeam
impl Sync for LiveTeam
impl Unpin for LiveTeam
impl UnsafeUnpin for LiveTeam
impl UnwindSafe for LiveTeam
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more