Documentation
¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func EnsureJobLogIndex()
- func GetVersion(ctx *Context)
- func InStringArray(k string, ss []string) bool
- func InitServer() (*http.Server, error)
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func RunLogCleaner(cleanPeriod, expiration time.Duration) (close chan struct{})
- func SubtractStringArray(a, b []string) (c []string)
- func UniqueStringArray(a []string) []string
- type Account
- type Administrator
- type Authentication
- type BaseHandler
- type ByProcTime
- type Configuration
- type Context
- type Info
- type Job
- func (j *Job) BatchChangeJobStatus(ctx *Context)
- func (j *Job) ChangeJobStatus(ctx *Context)
- func (j *Job) DeleteJob(ctx *Context)
- func (j *Job) GetExecutingJob(ctx *Context)
- func (j *Job) GetGroups(ctx *Context)
- func (j *Job) GetJob(ctx *Context)
- func (j *Job) GetJobNodes(ctx *Context)
- func (j *Job) GetList(ctx *Context)
- func (j *Job) JobExecute(ctx *Context)
- func (j *Job) UpdateJob(ctx *Context)
- type JobLog
- type Node
- type ProcFetchOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶ added in v0.2.1
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶ added in v0.2.1
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶ added in v0.2.1
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetNames ¶ added in v0.2.1
func AssetNames() []string
AssetNames returns the names of the assets.
func EnsureJobLogIndex ¶ added in v0.3.1
func EnsureJobLogIndex()
func GetVersion ¶
func GetVersion(ctx *Context)
func InStringArray ¶
func InitServer ¶ added in v0.2.1
func MustAsset ¶ added in v0.2.1
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶ added in v0.2.1
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶ added in v0.2.1
RestoreAssets restores an asset under the given directory recursively
func RunLogCleaner ¶ added in v0.2.3
func SubtractStringArray ¶
返回存在于 a 且不存在于 b 中的元素集合
func UniqueStringArray ¶
Types ¶
type Administrator ¶ added in v0.2.1
type Administrator struct{}
func (*Administrator) AddAccount ¶ added in v0.2.1
func (this *Administrator) AddAccount(ctx *Context)
func (*Administrator) GetAccount ¶ added in v0.2.1
func (this *Administrator) GetAccount(ctx *Context)
func (*Administrator) GetAccountList ¶ added in v0.2.1
func (this *Administrator) GetAccountList(ctx *Context)
func (*Administrator) UpdateAccount ¶ added in v0.2.1
func (this *Administrator) UpdateAccount(ctx *Context)
type Authentication ¶ added in v0.2.1
type Authentication struct{}
func (*Authentication) DeleteAuthSession ¶ added in v0.2.1
func (this *Authentication) DeleteAuthSession(ctx *Context)
func (*Authentication) GetAuthSession ¶ added in v0.2.1
func (this *Authentication) GetAuthSession(ctx *Context)
func (*Authentication) SetPassword ¶ added in v0.2.1
func (this *Authentication) SetPassword(ctx *Context)
type BaseHandler ¶
type BaseHandler struct { Ctx map[string]interface{} BeforeHandle func(ctx *Context) (abort bool) Handle func(ctx *Context) }
func NewAdminAuthHandler ¶ added in v0.2.1
func NewAdminAuthHandler(f func(ctx *Context)) BaseHandler
func NewAuthHandler ¶ added in v0.2.1
func NewAuthHandler(f func(ctx *Context), reqRole cronsun.Role) BaseHandler
func NewBaseHandler ¶ added in v0.2.1
func NewBaseHandler(f func(ctx *Context)) BaseHandler
func (BaseHandler) ServeHTTP ¶
func (b BaseHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ByProcTime ¶
func (ByProcTime) Len ¶
func (a ByProcTime) Len() int
func (ByProcTime) Less ¶
func (a ByProcTime) Less(i, j int) bool
func (ByProcTime) Swap ¶
func (a ByProcTime) Swap(i, j int)
type Configuration ¶
type Configuration struct{}
func (*Configuration) Configuratios ¶
func (cnf *Configuration) Configuratios(ctx *Context)
type Context ¶ added in v0.2.1
type Job ¶
type Job struct{}
func (*Job) BatchChangeJobStatus ¶ added in v0.2.3
func (*Job) ChangeJobStatus ¶
func (*Job) GetExecutingJob ¶
func (*Job) GetJobNodes ¶
func (*Job) JobExecute ¶
type Node ¶
type Node struct{}
func (*Node) DeleteGroup ¶
func (*Node) DeleteNode ¶ added in v0.2.2
DeleteNode force remove node (by ip) which state in offline or damaged.