Documentation ¶
Index ¶
- type Config
- type Goemits
- func (ge *Goemits) Emit(event string, message interface{}) error
- func (ge *Goemits) EmitAll(message interface{})
- func (ge *Goemits) EmitMany(events []string, message interface{})
- func (ge *Goemits) On(event string, f func(interface{}))
- func (ge *Goemits) OnAny(f func(interface{}))
- func (ge *Goemits) Ping() error
- func (ge *Goemits) Quit() error
- func (ge *Goemits) RemoveListener(listener string)
- func (ge *Goemits) RemoveListeners(listeners []string)
- func (ge *Goemits) SetMaxListeners(num int)
- func (ge *Goemits) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // RedisAddress defines address for connect to Redis RedisAddress string // Number of maximum listeners MaxListeners int }
Config defines attributes for start
type Goemits ¶
type Goemits struct {
// contains filtered or unexported fields
}
Goemits defines main structure of the app
func (*Goemits) EmitAll ¶
func (ge *Goemits) EmitAll(message interface{})
EmitAll provides fire message to all of listeners
func (*Goemits) OnAny ¶
func (ge *Goemits) OnAny(f func(interface{}))
OnAny provides catching any event
func (*Goemits) RemoveListener ¶
RemoveListener from store and unsubscribe from "listener" channel
func (*Goemits) RemoveListeners ¶
RemoveListeners from the base
func (*Goemits) SetMaxListeners ¶
SetMaxListeners provides limitiation of amount of listeners
Click to show internal directories.
Click to hide internal directories.