Documentation ¶
Index ¶
- Variables
- func AdminIndex(rw http.ResponseWriter, r *http.Request)
- func Healthcheck(rw http.ResponseWriter, req *http.Request)
- func ListConf(rw http.ResponseWriter, r *http.Request)
- func ProfIndex(rw http.ResponseWriter, r *http.Request)
- func RunTask(rw http.ResponseWriter, req *http.Request)
- func TaskStatus(rw http.ResponseWriter, req *http.Request)
- type AdminApp
- type Configuration
- type TaskRunResult
Constants ¶
This section is empty.
Variables ¶
var Config = Configuration{}
Functions ¶
func AdminIndex ¶
func AdminIndex(rw http.ResponseWriter, r *http.Request)
AdminIndex is the default http.Handler for admin module. it matches url pattern "/".
func Healthcheck ¶
func Healthcheck(rw http.ResponseWriter, req *http.Request)
Healthcheck is a http.Handler calling health checking and showing the result. it's in "/healthcheck" pattern in admin module.
func ListConf ¶
func ListConf(rw http.ResponseWriter, r *http.Request)
ListConf is the http.Handler of displaying all configuration values as key/value pair. it's registered with url pattern "/listconf" in admin module.
func ProfIndex ¶
func ProfIndex(rw http.ResponseWriter, r *http.Request)
ProfIndex is a http.Handler for showing profile command. it's in url pattern "/prof" in admin module.
func RunTask ¶
func RunTask(rw http.ResponseWriter, req *http.Request)
RunTask is a http.Handler to run a Task from the "query string. the request url likes /runtask?taskname=sendmail.
func TaskStatus ¶
func TaskStatus(rw http.ResponseWriter, req *http.Request)
TaskStatus is a http.Handler with running task status (task name, status and the last execution). it's in "/task" pattern in admin module.
Types ¶
type AdminApp ¶
type AdminApp struct {
// contains filtered or unexported fields
}
AdminApp is an http.HandlerFunc map used as AdminApp.
var MyAdminApp *AdminApp
MyAdminApp is the default AdminApp used by admin module.
type Configuration ¶
type Configuration struct { SupportAdmin bool AdminHttpAddr string AdminHttpPort int WhiteHttpAddr []string }
func (*Configuration) Close ¶
func (c *Configuration) Close() error
func (*Configuration) Init ¶
func (c *Configuration) Init() error
func (*Configuration) Name ¶
func (c *Configuration) Name() string