Documentation ¶
Index ¶
- Constants
- func RandSelector(clients []string) (string, error)
- func SelectClient(scheduler int, clients []string) (string, error)
- type Client
- type ClientInfo
- type Handler
- type HandlerInfo
- type Handlers
- type Job
- type Jobs
- func (j *Jobs) AddJob(job *Job) error
- func (j *Jobs) CountJob() (int64, error)
- func (j *Jobs) GetFirstJobKey() (string, error)
- func (j *Jobs) GetJob(id string) (*Job, error)
- func (j *Jobs) ListJob() ([]*Job, error)
- func (j *Jobs) PageJob(firstKey string, limit int64) ([]*Job, error)
- func (j *Jobs) RemoveJob(id string) error
- func (j *Jobs) Watch() (*etcdv3.Watcher, error)
- type Registry
- type Server
- type Work
- type Works
Constants ¶
View Source
const ( NotExecuted = iota Executed Fail Finish )
View Source
const (
HandlerPrefix = "/sapi/scheduler/handler"
)
View Source
const (
JobPrefix = "/sapi/scheduler/job"
)
View Source
const (
RAND = iota
)
View Source
const (
RegistryPrefix = "/sapi/scheduler/client"
)
View Source
const (
WorkPrefix = "/sapi/scheduler/work"
)
Variables ¶
This section is empty.
Functions ¶
func RandSelector ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddHandler ¶
type ClientInfo ¶
type HandlerInfo ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func (*Handlers) ListHandlers ¶
func (*Handlers) PutHandler ¶
type Job ¶
type Job struct { ID string Name string Remark string Cron string RunMode int ExecMode int HandlerName string Scheduler int ChildJobId string Timeout int64 RetryNumber int UserName string Email string Param string Status int //是否开启 // contains filtered or unexported fields }
func (*Job) SetHandlers ¶
type Jobs ¶
type Jobs struct {
// contains filtered or unexported fields
}
func (*Jobs) GetFirstJobKey ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) Deregister ¶
func (*Registry) ListClients ¶
func (r *Registry) ListClients() ([]*ClientInfo, error)
func (*Registry) Register ¶
func (r *Registry) Register(client *ClientInfo) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetRegistry ¶
Click to show internal directories.
Click to hide internal directories.