mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-03 13:23:07 +00:00
rename validation.Publish to PushLocal
This commit is contained in:
parent
32b8d8958e
commit
175d43f4e7
2
topic.go
2
topic.go
@ -241,7 +241,7 @@ func (t *Topic) Publish(ctx context.Context, data []byte, opts ...PubOpt) error
|
||||
t.p.disc.Bootstrap(ctx, t.topic, pub.ready)
|
||||
}
|
||||
|
||||
return t.p.val.Publish(&Message{m, t.p.host.ID(), nil})
|
||||
return t.p.val.PushLocal(&Message{m, t.p.host.ID(), nil})
|
||||
}
|
||||
|
||||
// WithReadiness returns a publishing option for only publishing when the router is ready.
|
||||
|
||||
@ -210,9 +210,10 @@ func (v *validation) RemoveValidator(req *rmValReq) {
|
||||
}
|
||||
}
|
||||
|
||||
// Publish synchronously accepts a locally published message, performs applicable
|
||||
// validations and pushes the message for propagate by the pubsub system
|
||||
func (v *validation) Publish(msg *Message) error {
|
||||
// PushLocal synchronously pushes a locally published message and performs applicable
|
||||
// validations.
|
||||
// Returns an error if validation fails
|
||||
func (v *validation) PushLocal(msg *Message) error {
|
||||
v.p.tracer.PublishMessage(msg)
|
||||
|
||||
err := v.p.checkSignature(msg)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user