Add option to force drain rtcService/agentService connections. (#4618)

When force: true, drain as fast as possible.
This commit is contained in:
Raja Subramanian
2026-06-23 16:10:50 +05:30
committed by GitHub
parent 6658dd5454
commit 0cf53e2f0d
3 changed files with 37 additions and 20 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ import (
type AgentService interface {
HandleConnection(context.Context, agent.SignalConn, agent.WorkerRegistration)
DrainConnections(time.Duration)
DrainConnections(time.Duration, bool)
}
type TestServer struct {
@@ -140,7 +140,7 @@ func (h *TestServer) SimulateAgentWorker(opts ...SimulatedWorkerOption) *AgentWo
}
func (h *TestServer) Close() {
h.DrainConnections(1)
h.DrainConnections(1, false)
}
var _ agent.SignalConn = (*AgentWorker)(nil)