From 95fc6de88975781abfe576977c960197a9743442 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sat, 24 Jan 2026 17:46:54 +0300 Subject: v1.0.0 --- opts.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 opts.go (limited to 'opts.go') diff --git a/opts.go b/opts.go new file mode 100644 index 0000000..620e263 --- /dev/null +++ b/opts.go @@ -0,0 +1,26 @@ +package eventbus + +type Opt interface { + Apply(b *bus) +} + +type NameSeparator string + +func (n NameSeparator) Apply(b *bus) { + b.nameSeparator = string(n) +} + +type Wildcard string + +func (w Wildcard) Apply(b *bus) { + b.wildcard = string(w) +} + +type Capacity int + +func (c Capacity) Apply(b *bus) { + b.listeners = node[Listener]{ + children: make(map[string]*node[Listener], c), + values: make([]Listener, 0, c), + } +} -- cgit v1.2.3