move init functions to top of file

This commit is contained in:
Joel Wetzell
2026-05-22 17:45:03 -05:00
parent fb3c775765
commit 4323a21015
67 changed files with 1706 additions and 1706 deletions
+14 -14
View File
@@ -12,20 +12,6 @@ import (
"github.com/nats-io/nats.go"
)
type NATSClient struct {
config config.ModuleConfig
ctx context.Context
inputHandler common.InputHandler
URL string
Subject string
client *nats.Conn
logger *slog.Logger
cancel context.CancelFunc
sub *nats.Subscription
subMu sync.Mutex
clientMu sync.Mutex
}
func init() {
RegisterModule(ModuleRegistration{
Type: "nats.client",
@@ -63,6 +49,20 @@ func init() {
})
}
type NATSClient struct {
config config.ModuleConfig
ctx context.Context
inputHandler common.InputHandler
URL string
Subject string
client *nats.Conn
logger *slog.Logger
cancel context.CancelFunc
sub *nats.Subscription
subMu sync.Mutex
clientMu sync.Mutex
}
func (nc *NATSClient) Id() string {
return nc.config.Id
}