Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
495 changes: 84 additions & 411 deletions README.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion behaviors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,15 @@ func TestIntegrationOnEvent(t *testing.T) {

var mu sync.Mutex
kinds := map[PoolEventKind]int{}
r.d.pools.OnEvent(func(ev *PoolEvent) {
events, err := r.d.pools.ObserveEvents(func(ev *PoolEvent) {
mu.Lock()
kinds[ev.Kind]++
mu.Unlock()
})
if err != nil {
t.Fatal(err)
}
defer func() { _ = r.d.pools.UnsubscribeEvents(events) }()

r.invoke(t, "start")
id := r.d.pool()
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/JairusSW/pool

go 1.24.0

require github.com/wago-org/wago v0.0.0-20260711053856-7d89b98c854d
require github.com/wago-org/wago v0.0.0-20260812144524-1c58c9862d25

require github.com/wago-org/workers v0.0.0-20260712075105-c0bceb592dc0
require github.com/wago-org/workers v0.0.0-20260812144603-4a90ff25d5e4
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/wago-org/wago v0.0.0-20260711053856-7d89b98c854d h1:fzJn6UlsGwiqwyTN+Si6oFoETUhUoJ/Rphhx94M5Pqc=
github.com/wago-org/wago v0.0.0-20260711053856-7d89b98c854d/go.mod h1:d44S+59u6VHeqEaIZBKTeB8viyswTP97O9IKA6Gyzc4=
github.com/wago-org/workers v0.0.0-20260712075105-c0bceb592dc0 h1:CRsh9Z+Iilmr6odi9Xlg2asrpffciQrHIARIVlzQ9sg=
github.com/wago-org/workers v0.0.0-20260712075105-c0bceb592dc0/go.mod h1:lRgtcCNsXr30h+ZovoKMGhKMvk6slR1cwFDZ7HoBo2g=
github.com/wago-org/wago v0.0.0-20260812144524-1c58c9862d25 h1:gopNHvaUaDSzmW2Hfd32r8dOwwzYUHH3ph1L/IuhJUA=
github.com/wago-org/wago v0.0.0-20260812144524-1c58c9862d25/go.mod h1:6XmxI3S5qJ+YAzObyXjC6FmxHtbLhBBxrglzix42zl8=
github.com/wago-org/workers v0.0.0-20260812144603-4a90ff25d5e4 h1:Z7S9Hj+JZ8OdNWLgzRjUQOvPIEQpEFNtyRSoHnUYOlI=
github.com/wago-org/workers v0.0.0-20260812144603-4a90ff25d5e4/go.mod h1:FLuFlQ7n+DNP0VNAZuGc702UIxC/JfLuhyuacMQNFp8=
Loading
Loading