Commit Graph

12 Commits

Author SHA1 Message Date
Jay a721eabd48 place attribute on handler 2026-05-21 17:02:07 -04:00
Jay f144a2a724 update logging 2026-05-21 08:19:37 -04:00
Jay c8c8a528f6 cleanup 2026-05-20 23:03:06 -04:00
Jay f1afca7921 cleanup and refactors 2026-05-20 22:49:25 -04:00
Jay cda6d286ab refactor(worker): collapse session goroutines into single runSession loop
Replace the five-goroutine session model (RunDialer, RunKeepalive,
RunReader, RunHeartbeatForwarder, RunStopMonitor, Session) with a single
DefaultWorker.runSession method containing two select loops: one
pre-connection and one connected. Ephemeral dial goroutines replace
RunDialer; the keepalive timer and heartbeat reset are inlined. No
exported building-block symbols remain.

Consolidate worker_dialer_test.go, worker_session_test.go, and
worker_start_test.go into worker_test.go. Add seven new behavioral
tests covering dial failure, keepalive-driven dial replacement,
pre-connection stop, message delivery with timestamp, sustained
activity and pong resetting the keepalive timer, keepalive-triggered
reconnect, and nil connection pointer after disconnect.
Update EXTEND.md and README.md to remove references to the deleted

building blocks and document the single worker replacement pattern
2026-05-20 18:17:04 -04:00
Jay b44a46ed2f Migrate logging to go-mana-component; delete logging/ package
Replaces the flat key-value logging scheme with component-based structured
logging via go-mana-component. Each layer (pool, worker, connection) builds
its own component identity and derives a *slog.Logger from a caller-supplied
slog.Handler.

- Delete logging/ package (logging.go, logging_test.go)
- Strip LoggingEnabled and LogLevel from ConnectionConfig, PoolConfig,
 WorkerConfig; remove associated option funcs
- Change NewConnection and NewConnectionFromSocket to accept ctx and
 slog.Handler instead of *slog.Logger; constructors build component
 identity via MustNew/MustExtend internally
- Change WorkerFactory, NewWorker, connect, and RunDialer to carry
 slog.Handler; remove PoolPlugin.Handler
- Change NewPool to establish pool component identity via MustNew;
 remove pool_id field, PoolPlugin.ID, and ErrInvalidPoolID
- Fix data race in MockSlogHandler: WithAttrs now shares parent mutex
 pointer rather than allocating a new one per child
- Run go fix
2026-05-20 13:04:58 -04:00
Jay 6facb6eed0 remove references to the queue 2026-05-20 08:53:46 -04:00
Jay 093a56ea56 gut inbound and queue. promote outbound to honeybee. 2026-05-20 08:46:13 -04:00
jay 7dab8031ea Refactored package structure. 2026-04-17 14:53:29 -04:00
jay 866a7055a0 Fix unknown field. 2026-04-17 13:31:36 -04:00
jay d27e783729 Initial buildout of worker pattern. 2026-04-17 13:29:49 -04:00
jay 043fba0198 Create worker module. 2026-04-17 08:53:52 -04:00