Documentation
¶
Index ¶
- Constants
- type DataMessage
- type PubSub
- func (p2pdbPubSub *PubSub) GetType() string
- func (p2pdbPubSub *PubSub) InitPubSub(Type string, Host host.Host) PubSub
- func (p2pdbPubSub *PubSub) Pub(message DataMessage)
- func (p2pdbPubSub *PubSub) SetHost(Host host.Host)
- func (p2pdbPubSub *PubSub) SetType(Type string)
- func (p2pdbPubSub *PubSub) StartNewSubscribeService(sub *libpubsub.Subscription)
- type PubSubInterface
- type SubHandler
Constants ¶
View Source
const GlobalTopic string = ("p2pdb")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataMessage ¶
type DataMessage struct { Type string Data interface{} }
type PubSub ¶
type PubSub struct { Host host.Host Topic *libpubsub.Topic Type string SubHandler SubHandler // contains filtered or unexported fields }
func (*PubSub) InitPubSub ¶ added in v0.0.9
func (*PubSub) Pub ¶
func (p2pdbPubSub *PubSub) Pub(message DataMessage)
func (*PubSub) StartNewSubscribeService ¶ added in v0.0.3
func (p2pdbPubSub *PubSub) StartNewSubscribeService(sub *libpubsub.Subscription)
type PubSubInterface ¶ added in v0.0.7
type PubSubInterface interface { InitPubSub() GetType() string SetType(Type string) Pub(message DataMessage) Sub() (*libpubsub.Subscription, *libpubsub.Topic, error) // contains filtered or unexported methods }
type SubHandler ¶
type SubHandler interface {
SubHandler(DataMessage)
}
Click to show internal directories.
Click to hide internal directories.