Documentation
¶
Index ¶
- func GetOnline(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func GetOnlineDump(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func LoadConfig(path string) error
- func RegistRoutes(r *httprouter.Router)
- func SetOnline(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func SetupStater() error
- type AppConfig
- type Config
- type HttpConfig
- type MemCounter
- type MemStater
- type RedisConfig
- type RedisStater
- type Stater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOnline ¶
func GetOnline(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func GetOnlineDump ¶
func GetOnlineDump(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func LoadConfig ¶
func RegistRoutes ¶
func RegistRoutes(r *httprouter.Router)
func SetOnline ¶
func SetOnline(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func SetupStater ¶
func SetupStater() error
Types ¶
type AppConfig ¶
type AppConfig struct { Timeout int `yaml:"timeout"` Redis RedisConfig `yaml:"redis"` }
type Config ¶
type HttpConfig ¶
type HttpConfig struct {
Port int `yaml:"port"`
}
type MemCounter ¶
type MemStater ¶
type MemStater struct {
Apps map[string]*MemCounter
}
type RedisConfig ¶
type RedisStater ¶
type RedisStater struct {
// contains filtered or unexported fields
}
func (*RedisStater) Dump ¶
func (s *RedisStater) Dump(app string) []string
func (*RedisStater) Get ¶
func (s *RedisStater) Get(app string) int
func (*RedisStater) Run ¶
func (s *RedisStater) Run() error
Click to show internal directories.
Click to hide internal directories.