Add worker self-retire on terminal dial failure

This commit is contained in:
Jay
2026-06-06 19:41:45 -04:00
parent 1977fb385a
commit 7657de160e
3 changed files with 116 additions and 10 deletions
+2
View File
@@ -41,6 +41,7 @@ const (
EventConnected PoolEventKind = "connected"
EventDisconnected PoolEventKind = "disconnected"
EventDialFailed PoolEventKind = "dial_failed"
EventRetired PoolEventKind = "retired"
)
type PoolEvent struct {
@@ -70,6 +71,7 @@ type PoolPlugin struct {
Inbox chan<- types.InboxMessage
Events chan<- PoolEvent
InboxCounter *atomic.Uint64
Retire func(error)
}
// ----------------------------------------------------------------------------