From 8f5c03ad608a86f4782db0c3e057596bc1d6f2cc Mon Sep 17 00:00:00 2001 From: pugnack Date: Fri, 23 May 2025 01:45:39 +0500 Subject: [PATCH] [v4] hide access to internal mutex (#185) * changed embedded mutex to private field * update ci * fix tests --- subscriber.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/subscriber.go b/subscriber.go index 9fde3f2..c61854a 100644 --- a/subscriber.go +++ b/subscriber.go @@ -39,16 +39,15 @@ type consumer struct { } type Subscriber struct { - consumers map[tp]*consumer - c *kgo.Client - htracer *hookTracer - topic string - messagePool bool - handler interface{} - done chan struct{} - kopts broker.Options - opts broker.SubscribeOptions - + consumers map[tp]*consumer + c *kgo.Client + htracer *hookTracer + topic string + messagePool bool + handler interface{} + done chan struct{} + kopts broker.Options + opts broker.SubscribeOptions connected *atomic.Uint32 mu sync.RWMutex closed bool