Documentation ¶
Index ¶
- type DefaultObserver
- func (o *DefaultObserver) Publish(event string, data interface{}) error
- func (o *DefaultObserver) PublishTimeout(event string, data interface{}, timeout time.Duration) error
- func (o *DefaultObserver) String() string
- func (o *DefaultObserver) Subscribe(event string, outputChan chan interface{})
- func (o *DefaultObserver) Unsubscribe(event string, outputChan chan interface{}) error
- func (o *DefaultObserver) UnsubscribeAll(event string) error
- type Observer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultObserver ¶
type DefaultObserver struct {
// contains filtered or unexported fields
}
func NewObserver ¶
func NewObserver(name string) *DefaultObserver
func (*DefaultObserver) Publish ¶
func (o *DefaultObserver) Publish(event string, data interface{}) error
func (*DefaultObserver) PublishTimeout ¶
func (o *DefaultObserver) PublishTimeout(event string, data interface{}, timeout time.Duration) error
func (*DefaultObserver) String ¶
func (o *DefaultObserver) String() string
func (*DefaultObserver) Subscribe ¶
func (o *DefaultObserver) Subscribe(event string, outputChan chan interface{})
func (*DefaultObserver) Unsubscribe ¶
func (o *DefaultObserver) Unsubscribe(event string, outputChan chan interface{}) error
Stop observing the specified event on the provided output channel
func (*DefaultObserver) UnsubscribeAll ¶
func (o *DefaultObserver) UnsubscribeAll(event string) error
Stop observing the specified event on all channels
Click to show internal directories.
Click to hide internal directories.