mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-25 16:44:01 +08:00
commit
10115e9882
3 changed files with 11 additions and 2 deletions
9
main.go
9
main.go
|
@ -9,6 +9,7 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -30,6 +31,7 @@ import (
|
|||
func main() {
|
||||
fmt.Println(models.RetrieveLogo()) // print the logo
|
||||
initialize() // initial db and grpc server
|
||||
setGarbageCollection()
|
||||
defer database.CloseDB()
|
||||
startControllers() // start the grpc or rest endpoints
|
||||
}
|
||||
|
@ -193,6 +195,13 @@ func authServerUnaryInterceptor() grpc.ServerOption {
|
|||
return grpc.UnaryInterceptor(controller.AuthServerUnaryInterceptor)
|
||||
}
|
||||
|
||||
func setGarbageCollection() {
|
||||
_, gcset := os.LookupEnv("GOGC")
|
||||
if !gcset {
|
||||
debug.SetGCPercent(ncutils.DEFAULT_GC_PERCENT)
|
||||
}
|
||||
}
|
||||
|
||||
// func authServerStreamInterceptor() grpc.ServerOption {
|
||||
// return grpc.StreamInterceptor(controller.AuthServerStreamInterceptor)
|
||||
// }
|
||||
|
|
|
@ -24,7 +24,7 @@ func main() {
|
|||
app := cli.NewApp()
|
||||
app.Name = "Netclient CLI"
|
||||
app.Usage = "Netmaker's netclient agent and CLI. Used to perform interactions with Netmaker server and set local WireGuard config."
|
||||
app.Version = "v0.8.6"
|
||||
app.Version = "v0.9.0"
|
||||
|
||||
hostname, err := os.Hostname()
|
||||
if err != nil {
|
||||
|
|
|
@ -109,7 +109,7 @@ func GetAPIConnString() string {
|
|||
|
||||
// GetVersion - version of netmaker
|
||||
func GetVersion() string {
|
||||
version := "0.8.5"
|
||||
version := "0.9.0"
|
||||
if config.Config.Server.Version != "" {
|
||||
version = config.Config.Server.Version
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue