mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-14 21:57:49 +08:00
28 lines
711 B
Go
28 lines
711 B
Go
package functions
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
cfg "github.com/gravitl/netmaker/config"
|
|
"github.com/gravitl/netmaker/models"
|
|
)
|
|
|
|
// GetLogs - fetch Netmaker server logs
|
|
func GetLogs() string {
|
|
return get("/api/logs")
|
|
}
|
|
|
|
// GetServerInfo - fetch minimal server info
|
|
func GetServerInfo() *models.ServerConfig {
|
|
return request[models.ServerConfig](http.MethodGet, "/api/server/getserverinfo", nil)
|
|
}
|
|
|
|
// GetServerConfig - fetch entire server config including secrets
|
|
func GetServerConfig() *cfg.ServerConfig {
|
|
return request[cfg.ServerConfig](http.MethodGet, "/api/server/getconfig", nil)
|
|
}
|
|
|
|
// GetServerHealth - fetch server current health status
|
|
func GetServerHealth() string {
|
|
return get("/api/server/health")
|
|
}
|