isRemoteTopic checks if the given topic is handled by this node or a remote node.
(topic string)
| 797 | |
| 798 | // isRemoteTopic checks if the given topic is handled by this node or a remote node. |
| 799 | func (c *Cluster) isRemoteTopic(topic string) bool { |
| 800 | if c == nil { |
| 801 | // Cluster not initialized, all topics are local |
| 802 | return false |
| 803 | } |
| 804 | return c.ring.Get(topic) != c.thisNodeName |
| 805 | } |
| 806 | |
| 807 | // genLocalTopicName is just like genTopicName(), but the generated name belongs to the current cluster node. |
| 808 | func (c *Cluster) genLocalTopicName() string { |
no test coverage detected