Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Subscribe ¶
func Subscribe(fanout *Fanout, sub ...*SafeChannel)
func Unsubscribe ¶
func Unsubscribe(fanout *Fanout, sub ...*SafeChannel)
Types ¶
type Fanout ¶
func NewFanout ¶
func NewFanout(pub *SafeChannel) *Fanout
func (*Fanout) NewSubscriber ¶
func (fanout *Fanout) NewSubscriber(size ...int) *SafeChannel
func (*Fanout) SubChan ¶
func (fanout *Fanout) SubChan() <-chan *SafeChannel
func (*Fanout) Subscribe ¶
func (fanout *Fanout) Subscribe(sub ...*SafeChannel)
func (*Fanout) Unsubscribe ¶
func (fanout *Fanout) Unsubscribe(sub *SafeChannel)
type SafeChannel ¶
type SafeChannel struct { C chan T // contains filtered or unexported fields }
func NewSafeChannel ¶
func NewSafeChannel(size ...int) *SafeChannel
func WrapSafeChannel ¶
func WrapSafeChannel(c chan T) *SafeChannel
func (*SafeChannel) IsClosed ¶
func (me *SafeChannel) IsClosed() bool
func (*SafeChannel) SafeClose ¶
func (me *SafeChannel) SafeClose()
func (*SafeChannel) SafeSend ¶
func (me *SafeChannel) SafeSend(value T) bool
Click to show internal directories.
Click to hide internal directories.