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), } }