Documentation
¶
Index ¶
- Constants
- Variables
- type Gossip
- func (g *Gossip) Close() (err error)
- func (g *Gossip) IsGossipRunning() bool
- func (g *Gossip) NodeInfo() warpnet.NodeInfo
- func (g *Gossip) NotSubscribers(topicName string) []warpnet.WarpAddrInfo
- func (g *Gossip) Publish(msg event.Message, topics ...string) (err error)
- func (g *Gossip) Run(node GossipNodeConnector) (err error)
- func (g *Gossip) SelfPublish(data []byte) error
- func (g *Gossip) Subscribe(handlers ...TopicHandler) (err error)
- func (g *Gossip) Subscribers(topicName string) []warpnet.WarpAddrInfo
- func (g *Gossip) Unsubscribe(topics ...string) (err error)
- type GossipNodeConnector
- type TopicHandler
Constants ¶
View Source
const (
PubSubDiscoveryTopic = "peer-discovery"
)
Variables ¶
View Source
var ErrTopicClosed = pubsub.ErrTopicClosed
Functions ¶
This section is empty.
Types ¶
type Gossip ¶ added in v0.5.8
type Gossip struct {
// contains filtered or unexported fields
}
func NewGossip ¶ added in v0.5.8
func NewGossip( ctx context.Context, handlers ...TopicHandler, ) *Gossip
func (*Gossip) IsGossipRunning ¶ added in v0.5.8
func (*Gossip) NotSubscribers ¶ added in v0.5.8
func (g *Gossip) NotSubscribers(topicName string) []warpnet.WarpAddrInfo
func (*Gossip) Run ¶ added in v0.5.8
func (g *Gossip) Run(node GossipNodeConnector) (err error)
func (*Gossip) SelfPublish ¶ added in v0.5.8
func (*Gossip) Subscribe ¶ added in v0.5.8
func (g *Gossip) Subscribe(handlers ...TopicHandler) (err error)
func (*Gossip) Subscribers ¶ added in v0.5.8
func (g *Gossip) Subscribers(topicName string) []warpnet.WarpAddrInfo
func (*Gossip) Unsubscribe ¶ added in v0.5.8
type GossipNodeConnector ¶ added in v0.3.112
type TopicHandler ¶ added in v0.3.112
type TopicHandler struct {
TopicName string
Handler topicHandler
}
func NewDiscoveryTopicHandler ¶ added in v0.3.113
func NewDiscoveryTopicHandler(handler topicHandler) TopicHandler
Click to show internal directories.
Click to hide internal directories.