rearanged the DefaultClient struct fields to reduce its size from ~72 to ~32 bytes
This commit is contained in:
parent
80d774a8ef
commit
6d672348e7
|
@ -60,12 +60,12 @@ var _ Client = (*DefaultClient)(nil)
|
||||||
|
|
||||||
// DefaultClient defines a generic subscription client.
|
// DefaultClient defines a generic subscription client.
|
||||||
type DefaultClient struct {
|
type DefaultClient struct {
|
||||||
mux sync.RWMutex
|
|
||||||
isDiscarded bool
|
|
||||||
id string
|
|
||||||
store map[string]any
|
store map[string]any
|
||||||
channel chan Message
|
channel chan Message
|
||||||
subscriptions map[string]struct{}
|
subscriptions map[string]struct{}
|
||||||
|
id string
|
||||||
|
mux sync.RWMutex
|
||||||
|
isDiscarded bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDefaultClient creates and returns a new DefaultClient instance.
|
// NewDefaultClient creates and returns a new DefaultClient instance.
|
||||||
|
|
Loading…
Reference in New Issue