Documentation
¶
Overview ¶
Package requestlane estimates control-response completion independently of content throughput, transport providers, and operation delivery authority.
Index ¶
Constants ¶
const ( InitialResponse = 250 * time.Millisecond MinimumResponse = time.Millisecond MaximumEstimate = time.Hour )
Variables ¶
This section is empty.
Functions ¶
func Managed ¶
func Managed(kind protocolsession.MessageKind) bool
Managed excludes streams and negotiations: their lifetime is not a control RTT.
Types ¶
type Call ¶
type Call struct {
// contains filtered or unexported fields
}
Call owns at most one reservation across proven-unsent admission retries. Its lifetime is independent of trace collection and application response sinks.
type Estimate ¶
type Estimate struct {
Response time.Duration
QueuedContent time.Duration
Expected time.Duration
Pending uint32
}
Estimate records the decision inputs before the new request is reserved.
type Lane ¶
type Lane struct {
// contains filtered or unexported fields
}
Lane belongs to one physical incarnation. Retired reservations may finish on this object but cannot update a replacement lane with the same logical ID.
func New ¶
New accepts measured latency, including a sub-clock-resolution zero sample. Callers without evidence supply InitialResponse explicitly.
func (*Lane) Estimate ¶
func (lane *Lane) Estimate(kind protocolsession.MessageKind, now time.Time, queued time.Duration) Estimate
func (*Lane) Reserve ¶
func (lane *Lane) Reserve(kind protocolsession.MessageKind, now time.Time) *Reservation
type Reservation ¶
type Reservation struct {
// contains filtered or unexported fields
}
Reservation is scheduling accounting only; it never authorizes sends or retries.
func (*Reservation) Abandon ¶
func (reservation *Reservation) Abandon()
Abandon releases accounting without mistaking caller cancellation for a fast response or a transport failure. Repeated settlement is deliberately harmless.
func (*Reservation) Complete ¶
func (reservation *Reservation) Complete(now time.Time)
Complete samples the authenticated final response, before application decoding, disk publication, or caller cleanup can inflate the path's response estimate.