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) }