Documentation
¶
Overview ¶
Broadcast over channels.
Index ¶
- type Group
- func (r *Group) Add(out chan interface{})
- func (r *Group) Broadcast()
- func (r *Group) BroadcastFor(totalTimeout time.Duration, messageTimeout time.Duration)
- func (r *Group) Close()
- func (r *Group) Join() *Member
- func (r *Group) MemberCount() int
- func (r *Group) Members() []chan interface{}
- func (r *Group) Remove(received Message)
- func (r *Group) Send(val interface{})
- type Member
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Represents broadcast group.
func (*Group) Broadcast ¶
func (r *Group) Broadcast()
Broadcast messages received from one group member to others. See https://github.com/grafov/bcast/issues/4 for rationale.
func (*Group) BroadcastFor ¶
Broadcast messages received from one group member to others. If incoming messages not arrived during `totalTimeout` then function returns. Will wait `messageTimeout` for message to be read by a group member
func (*Group) MemberCount ¶
type Member ¶
type Member struct {
In chan interface{} // (public) get messages from others to own channel
// contains filtered or unexported fields
}
Represents member of broadcast group.
Click to show internal directories.
Click to hide internal directories.