perf(cmpp): decouple supplier result callbacks
This commit is contained in:
@@ -22,13 +22,21 @@ const (
|
||||
)
|
||||
|
||||
type Manager struct {
|
||||
APIBaseURL string
|
||||
HTTPClient *http.Client
|
||||
APIBaseURL string
|
||||
HTTPClient *http.Client
|
||||
SubmitSegmentPublisher SubmitSegmentPublisher
|
||||
|
||||
mu sync.Mutex
|
||||
conns map[string]*connectionPool
|
||||
}
|
||||
|
||||
// SubmitSegmentPublisher persists each supplier response before the next long-message
|
||||
// segment is sent. The boundary is intentionally storage-only: HTTP callbacks belong to
|
||||
// the result Outbox worker and must not consume a supplier Submit window slot.
|
||||
type SubmitSegmentPublisher interface {
|
||||
PublishSubmitSegment(context.Context, queue.SubmitCommand, queue.SubmitSegmentResult) error
|
||||
}
|
||||
|
||||
type ConnectionState struct {
|
||||
ChannelID string `json:"channelId"`
|
||||
ConnectionID string `json:"connectionId"`
|
||||
|
||||
Reference in New Issue
Block a user