Documentation ¶
Index ¶
Constants ¶
View Source
const (
TopicPeerNoCheckPeriods = 500 * time.Millisecond
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StreamWorker ¶
type StreamWorker struct { ProtoID protocol.ID SGetter StreamGetter }
type TopicReader ¶
type TopicReader func(*TopicWorker)
type TopicWorker ¶
type TopicWorker struct { Pub *pubsub.Topic Sub *pubsub.Subscription // contains filtered or unexported fields }
func (*TopicWorker) BroadCast ¶
func (tw *TopicWorker) BroadCast(data []byte) error
func (*TopicWorker) ID ¶
func (tw *TopicWorker) ID() string
func (*TopicWorker) PeersOfTopic ¶
func (tw *TopicWorker) PeersOfTopic() []peer.ID
func (*TopicWorker) ReadMsg ¶
func (tw *TopicWorker) ReadMsg() (*pubsub.Message, error)
func (*TopicWorker) Stop ¶
func (tw *TopicWorker) Stop()
func (*TopicWorker) WriteData ¶
func (tw *TopicWorker) WriteData(data []byte) error
Click to show internal directories.
Click to hide internal directories.