mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-02 12:53:09 +00:00
chore: better name
This commit is contained in:
parent
fcbbfd8131
commit
fed393e39d
@ -1160,8 +1160,8 @@ type TopicOptions struct{}
|
||||
|
||||
type TopicOpt func(t *Topic) error
|
||||
|
||||
// WithMsgIdFunction sets custom MsgIdFunction for a Topic, enabling topics to have own msg id generation rules.
|
||||
func WithMsgIdFunction(msgId MsgIdFunction) TopicOpt {
|
||||
// WithTopicMessageIdFn sets custom MsgIdFunction for a Topic, enabling topics to have own msg id generation rules.
|
||||
func WithTopicMessageIdFn(msgId MsgIdFunction) TopicOpt {
|
||||
return func(t *Topic) error {
|
||||
t.p.idGen.Set(t.topic, msgId)
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user