mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-18 04:40:03 +02:00
transport/publisher.go: pass ChannelInterface instead of string to Publish()
This commit is contained in:
parent
5202247200
commit
69a9e9f47d
4 changed files with 11 additions and 8 deletions
|
|
@ -33,10 +33,9 @@ func SpawnProccessor(shClient *shipclient.ShipClient, ns transport.Namespace, pu
|
|||
}
|
||||
|
||||
func (processor *ShipProcessor) queueMessage(channel transport.ChannelInterface, payload []byte) bool {
|
||||
key := processor.ns.NewKey(channel)
|
||||
err := processor.publisher.Publish(key.String(), payload)
|
||||
err := processor.publisher.Publish(channel, payload)
|
||||
if err != nil {
|
||||
log.WithError(err).Errorf("Failed to post to channel '%s'", key)
|
||||
log.WithError(err).Errorf("Failed to post to channel '%s'", channel)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue