package eventbus type Opt interface { Apply(b *Bus) } // NameSeparator sets the event name separator (default "."). type NameSeparator string func (n NameSeparator) Apply(b *Bus) { b.nameSeparator = string(n) } // Wildcard sets the wildcard character for subscriptions (default "*"). type Wildcard string func (w Wildcard) Apply(b *Bus) { b.wildcard = string(w) } // Capacity sets the initial capacity for listeners trie (default 32). 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), } }