pub struct PackCeiling {
pub bytes: u64,
pub refusal: String,
}Expand description
A byte ceiling for one push, and the line the client is told past it.
The twin of gunnar_wire::receive_pack::PackCeiling, which is where it is
enforced. Two declarations of two fields rather than one shared type,
deliberately: this crate does not depend on gunnar-wire and must not start
— the same boundary crate::ServiceRequest::git_protocol is a raw
String for. gunnar-server holds both and converts, which is
four lines at one seam (transport.rs) rather than a dependency edge
between two crates that have stayed apart on purpose. There is no logic here to duplicate: the deciding
is in the gate below, the enforcing is in the receive loop, and this is the
number travelling between them.
Fields§
§bytes: u64Packfile bytes past which the transfer is aborted mid-stream. A push of exactly this many bytes lands.
refusal: StringWhat the client is told when it trips — a whole refusal, naming the
cap and where to pay, the same shape PlanVerdict::Refuse carries,
because a tenant cut off mid-push must not be left reading “the pack is
malformed”.