pub struct Requests { /* private fields */ }Expand description
Serves the groups a track’s readers miss, the group-level analogue of
broadcast::Requests.
Most tracks never serve old content, so this capability lives on a dedicated
handle rather than Producer: a relay creates one (via
Producer::requests or Request::requests) to pull past groups
from upstream. While at least one is alive a reader’s miss queues a FillGroups for it
to serve; with none, the miss is named dropped, and a cache-miss
Consumer::fetch_group on an accepted track fails fast with Error::NotFound.
Keep taking fills until it drops: a reader waits on its fill until it is answered or
dropped, so a handle left alive but unread stalls that reader.
On the track’s own publisher a fetch (Consumer::fetch_group, or a peer’s bounded read of
named groups) also asks for groups past the newest one produced. A handler that may still
produce such a group, as a store still recording does, leaves it unanswered while keeping the
fill: the live feed delivering it answers the fill. FillGroups::drop_groups says it never
will be.
A live handle also lets a reader at a frame a group copy shed replay it: a FillGroups of
that one group from that frame asks for a flight, a copy of its own paced by the readers
riding it, which they leave for the copy ahead once it holds their frame within reach.
Serve it like any group, and stop once nobody reads it: see FillGroups::is_wanted.
Implementations§
Source§impl Requests
impl Requests
Sourcepub fn poll_requested_fill(&self, waiter: &Waiter) -> Poll<Result<FillGroups>>
pub fn poll_requested_fill(&self, waiter: &Waiter) -> Poll<Result<FillGroups>>
The next run of groups readers miss, to serve via FillGroups::accept and
FillGroups::drop_groups, including the group containing a reader’s time start that
no group the cache holds places (see FillGroups::floor), and a fetch’s groups past the
newest one produced (see Requests).
A relay fetches the run upstream; an origin serves the groups its cache evicted
from its own store, as moq-archive does. Errors once the track is aborted.
Sourcepub async fn requested_fill(&self) -> Result<FillGroups>
pub async fn requested_fill(&self) -> Result<FillGroups>
The next run of groups readers miss, to serve via FillGroups::accept and
FillGroups::drop_groups, including the group containing a reader’s time start that
no group the cache holds places (see FillGroups::floor), and a fetch’s groups past the
newest one produced (see Requests).
A relay fetches the run upstream; an origin serves the groups its cache evicted
from its own store, as moq-archive does. Errors once the track is aborted.
Awaits poll_requested_fill.