Files
sendico/api/pkg/messaging/natsb/nats.go
Stephan D 62a6631b9a
All checks were successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
service backend
2025-11-07 18:35:26 +01:00

19 lines
552 B
Go

package messaging
import (
"github.com/mitchellh/mapstructure"
mb "github.com/tech/sendico/pkg/messaging/broker"
"github.com/tech/sendico/pkg/messaging/internal/natsb"
nc "github.com/tech/sendico/pkg/messaging/internal/natsb/config"
"github.com/tech/sendico/pkg/mlogger"
"github.com/tech/sendico/pkg/model"
)
func NewNATSBroker(logger mlogger.Logger, config model.SettingsT) (mb.Broker, error) {
var conf nc.Settings
if err := mapstructure.Decode(config, &conf); err != nil {
return nil, err
}
return natsb.NewNatsBroker(logger, &conf)
}