changed store.Store to accept generic key type

This commit is contained in:
Gani Georgiev
2024-12-23 15:44:00 +02:00
parent e18116d859
commit 39df26ee21
12 changed files with 57 additions and 54 deletions
+2 -2
View File
@@ -9,13 +9,13 @@ import (
// Broker defines a struct for managing subscriptions clients.
type Broker struct {
store *store.Store[Client]
store *store.Store[string, Client]
}
// NewBroker initializes and returns a new Broker instance.
func NewBroker() *Broker {
return &Broker{
store: store.New[Client](nil),
store: store.New[string, Client](nil),
}
}