Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGlobalPi ¶
Types ¶
type Pi ¶
func NewPi ¶
Example ¶
package main import ( "fmt" "openpitrix.io/openpitrix/pkg/config" "openpitrix.io/openpitrix/pkg/logger" "openpitrix.io/openpitrix/pkg/pi" ) func main() { // TODO: Automatic startup dependent services. cfg := config.LoadConf() logger.SetLevelByString("debug") cfg.Mysql.Host = "localhost" cfg.Etcd.Endpoints = "localhost:2379" p := pi.NewPi(cfg) fmt.Println(p.GlobalConfig()) }
Output:
func (*Pi) GlobalConfig ¶
func (p *Pi) GlobalConfig() (globalCfg *config.GlobalConfig)
func (*Pi) ThreadWatchGlobalConfig ¶
func (p *Pi) ThreadWatchGlobalConfig(cb globalCfgWatcher)
Click to show internal directories.
Click to hide internal directories.