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
+12 -12
View File
@@ -16,18 +16,6 @@ import (
"github.com/nats-io/nats-server/v2/server"
)
type NATSServer struct {
config config.ModuleConfig
ctx context.Context
Ip string
Port int
inputHandler common.InputHandler
server *server.Server
logger *slog.Logger
cancel context.CancelFunc
serverMu sync.Mutex
}
func init() {
RegisterModule(ModuleRegistration{
Type: "nats.server",
@@ -80,6 +68,18 @@ func init() {
})
}
type NATSServer struct {
config config.ModuleConfig
ctx context.Context
Ip string
Port int
inputHandler common.InputHandler
server *server.Server
logger *slog.Logger
cancel context.CancelFunc
serverMu sync.Mutex
}
func (ns *NATSServer) Id() string {
return ns.config.Id
}