From 93776681be0ae9fcdbd1719bbd8cdf4245cffe17 Mon Sep 17 00:00:00 2001 From: Reza Date: Wed, 6 Dec 2023 14:57:20 +0100 Subject: [PATCH] pubsub fix --- lib/pubsub/functions.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pubsub/functions.go b/lib/pubsub/functions.go index 72e584ec..d1867038 100644 --- a/lib/pubsub/functions.go +++ b/lib/pubsub/functions.go @@ -47,10 +47,14 @@ func AddDriver(driver Interface) { func Subscribe(topic string, onMessage func(topic string, message []byte, driver Interface), params ...any) { defaultDriver.Subscribe(topic, onMessage, params...) } -func Publish(topic string, message []byte, params ...any) error { +func Publish(topic string, message any, params ...any) error { return defaultDriver.Publish(topic, message, params...) } +func PublishBytes(topic string, message []byte, params ...any) error { + return defaultDriver.PublishBytes(topic, message, params...) +} + func SetPrefix(s string) { defaultDriver.SetPrefix(s) }