返回 DeepSeek-Reasonix
stream_attempt.go
根目录 / internal / event / stream_attempt.go
1 package event
2
3 // StreamAttemptAction is the lifecycle phase of a local sampling attempt.
4 type StreamAttemptAction string
5
6 const (
7 StreamAttemptBegin StreamAttemptAction = "begin"
8 StreamAttemptDiscard StreamAttemptAction = "discard"
9 StreamAttemptCommit StreamAttemptAction = "commit"
10 )
11
12 // StreamAttemptInfo carries host-local bookkeeping for one sampling attempt.
13 // Reason is a fixed enum (connection_reset | premature_eof | idle_timeout).
14 type StreamAttemptInfo struct {
15 ID string
16 Action StreamAttemptAction
17 Attempt int // 1-based attempt number
18 Max int // total attempts including the first
19 Reason string
20 // Response is persisted locally; it is not part of the frontend wire schema.
21 Response *ResponseSummary
22 }
23
23 lines GO