1
0
Fork 0
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:
Henrik Hautakoski 2023-01-19 17:42:26 +01:00
parent 5202247200
commit 69a9e9f47d
4 changed files with 11 additions and 8 deletions

View file

@ -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