Decoupled worker from goroutines.

This commit is contained in:
Jay
2026-04-20 08:45:04 -04:00
parent 9859796338
commit 9b29592a39
10 changed files with 458 additions and 429 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ type Peer struct {
worker Worker
}
type WorkerContext struct {
type PoolPlugin struct {
Inbox chan<- InboxMessage
Events chan<- PoolEvent
Errors chan<- error
@@ -181,7 +181,7 @@ func (p *Pool) Connect(id string) error {
if p.logger != nil {
logger = p.logger.With("id", id)
}
ctx := WorkerContext{
ctx := PoolPlugin{
Inbox: p.inbox,
Events: p.events,
Errors: p.errors,