mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-04 05:43:06 +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
|
type TopicOpt func(t *Topic) error
|
||||||
|
|
||||||
// WithMsgIdFunction sets custom MsgIdFunction for a Topic, enabling topics to have own msg id generation rules.
|
// WithTopicMessageIdFn sets custom MsgIdFunction for a Topic, enabling topics to have own msg id generation rules.
|
||||||
func WithMsgIdFunction(msgId MsgIdFunction) TopicOpt {
|
func WithTopicMessageIdFn(msgId MsgIdFunction) TopicOpt {
|
||||||
return func(t *Topic) error {
|
return func(t *Topic) error {
|
||||||
t.p.idGen.Set(t.topic, msgId)
|
t.p.idGen.Set(t.topic, msgId)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user