Documentation ¶
Index ¶
- Variables
- func DB() *gorm.DB
- func HbsInfo() string
- func InitAll()
- func InitConfig()
- func InitDB()
- func InitLog()
- func InitRuntime()
- func MemMonitor()
- func ReloadConfig() error
- func Shutdown(ctx context.Context) error
- func Validator() error
- func VersionInfo() string
- type DatabaseConfig
- type GlobalConfig
- type HttpConfig
- type LogConfig
- type RpcConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version string = "v0.1" BinaryName string = "ops-hbs.dev" )
View Source
var (
ConfigFile string
)
Functions ¶
func InitConfig ¶
func InitConfig()
func InitRuntime ¶
func InitRuntime()
func MemMonitor ¶
func MemMonitor()
func ReloadConfig ¶
func ReloadConfig() error
func VersionInfo ¶
func VersionInfo() string
Types ¶
type DatabaseConfig ¶
type GlobalConfig ¶
type GlobalConfig struct { Debug bool `json:"debug"` Log *LogConfig `json:"log"` Database *DatabaseConfig `json:"database"` Rpc *RpcConfig `json:"rpc"` Http *HttpConfig `json:"http"` MaxCPURate float64 `json:"max_cpu_rate"` MaxMemRate float64 `json:"max_mem_rate"` }
func Conf ¶
func Conf() *GlobalConfig
type HttpConfig ¶
Click to show internal directories.
Click to hide internal directories.