✨ MQ, KV and MQ allocator
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/directory"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/http"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/kv"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/mq"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
|
||||
"github.com/fatih/color"
|
||||
"os"
|
||||
@@ -58,6 +59,14 @@ func main() {
|
||||
log.Info().Msg("Connected to kv (etcd)!")
|
||||
}
|
||||
|
||||
// Connect to message queue (nats)
|
||||
log.Info().Msg("Connecting to MQ (nats)...")
|
||||
if err := mq.ConnectNats(viper.GetString("mq.addr")); err != nil {
|
||||
log.Error().Err(err).Msg("An error occurred when connecting to MQ (nats). MQ related feature will be disabled.")
|
||||
} else {
|
||||
log.Info().Msg("Connected to MQ (nats)!")
|
||||
}
|
||||
|
||||
// Connect to database
|
||||
log.Info().Msg("Connecting to database...")
|
||||
if db, err := database.Connect(viper.GetString("database.dsn")); err != nil {
|
||||
|
Reference in New Issue
Block a user