Documentation
¶
Index ¶
Constants ¶
View Source
const ( Unknown = "Unknown" BadRequest = "BadRequest" Forbidden = "Forbidden" NotFound = "NotFound" PreconditionFailed = "PreconditionFailed" Internal = "Internal" ModelServerError = "ModelServerError" ResourceExhausted = "ResourceExhausted" )
View Source
const RequestDroppedReasonHeaderKey = "x-llm-d-request-dropped-reason"
RequestDroppedReasonHeaderKey is the HTTP response header that communicates the specific reason a request was dropped by flow control.
Variables ¶
This section is empty.
Functions ¶
func BuildErrResponse ¶
func BuildErrResponse(err error) (*extProcPb.ProcessingResponse, error)
BuildErrResponse maps an error to an Envoy ImmediateResponse with the appropriate HTTP status code and error message body. If the error code is not recognized, it returns a gRPC error instead of an ImmediateResponse.
func CanonicalCode ¶
CanonicalCode returns the error's ErrorCode.
Types ¶
type RequestDroppedReason ¶
type RequestDroppedReason string
RequestDroppedReason is the reason a request was rejected before dispatch or evicted after dispatch.
const ( // Rejected — request never reached an inference server. RequestDroppedReasonSaturated RequestDroppedReason = "rejected-saturated" RequestDroppedReasonTTLExpired RequestDroppedReason = "rejected-ttl-expired" RequestDroppedReasonContextCancelled RequestDroppedReason = "rejected-context-cancelled" RequestDroppedReasonShuttingDown RequestDroppedReason = "rejected-shutting-down" // Evicted — request was dispatched to an inference server and then killed. // The generic "evicted" reason is the current default used by ImmediateResponseEvictor.Evict(). // The specific sub-reasons are forward-looking for when EvictN() callers specify why they're evicting. RequestDroppedReasonEvicted RequestDroppedReason = "evicted" RequestDroppedReasonEvictedQueuePressure RequestDroppedReason = "evicted-queue-pressure" RequestDroppedReasonEvictedPriority RequestDroppedReason = "evicted-priority" )
Click to show internal directories.
Click to hide internal directories.