mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-05 22:33:10 +00:00
Add String() method to Topic.
This commit is contained in:
parent
769831b478
commit
c5ece1d0c7
5
topic.go
5
topic.go
@ -26,6 +26,11 @@ type Topic struct {
|
|||||||
closed bool
|
closed bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// String returns the topic associated with t
|
||||||
|
func (t *Topic) String() string {
|
||||||
|
return t.topic
|
||||||
|
}
|
||||||
|
|
||||||
// EventHandler creates a handle for topic specific events
|
// EventHandler creates a handle for topic specific events
|
||||||
// Multiple event handlers may be created and will operate independently of each other
|
// Multiple event handlers may be created and will operate independently of each other
|
||||||
func (t *Topic) EventHandler(opts ...TopicEventHandlerOpt) (*TopicEventHandler, error) {
|
func (t *Topic) EventHandler(opts ...TopicEventHandlerOpt) (*TopicEventHandler, error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user