feat: update

This commit is contained in:
sujit
2024-10-13 11:02:55 +05:45
parent f5ce142544
commit 2f39fb40d7
6 changed files with 54 additions and 17 deletions

View File

@@ -38,11 +38,11 @@ type Broker struct {
queues xsync.IMap[string, *Queue]
consumers xsync.IMap[string, *consumer]
publishers xsync.IMap[string, *publisher]
opts Options
opts *Options
}
func NewBroker(opts ...Option) *Broker {
options := setupOptions(opts...)
options := SetupOptions(opts...)
return &Broker{
queues: xsync.NewMap[string, *Queue](),
publishers: xsync.NewMap[string, *publisher](),
@@ -51,7 +51,7 @@ func NewBroker(opts ...Option) *Broker {
}
}
func (b *Broker) Options() Options {
func (b *Broker) Options() *Options {
return b.opts
}