Documentation ¶
Index ¶
- Constants
- Variables
- func AgentHBRlt(jid string, v interface{}) (interface{}, error)
- func AgentListRlt(jid string, v interface{}) (interface{}, error)
- func DistributeJob(jobId string, k, v interface{})
- func Finish(jobId string)
- func GetResult(jobId string) []string
- func GetStat(jobId string) map[string]interface{}
- func InitApiMap()
- func NewApiJobFunc() *apiJobFunc
- func NewCronJob(name string, conNum int, timeout int) (string, error)
- func NewCronJobManager() *cronJobManager
- func NewJob(name string, conNum int, timeout int, needRes bool) (string, error)
- func NewJobManager() *jobManager
- func StopJob(jobId string)
- func SyncRecv(transInfo TransInfo)
- type ApiJob
- type DisJob
- type DoJob
- type DoRlt
- type FinishSyncInfo
- type Job
- type JobArgs
- type JobResWithArgs
- type NewSyncInfo
- type SimpleJob
- func (sj *SimpleJob) Distribute(jid string, k, v interface{}) error
- func (sj *SimpleJob) Finish()
- func (sj *SimpleJob) GetId() string
- func (sj *SimpleJob) Retry()
- func (sj *SimpleJob) RltCallback(k string, v interface{}) (interface{}, error)
- func (sj *SimpleJob) Run(over chan bool)
- func (sj *SimpleJob) Stop()
- type StopSyncInfo
- type TransInfo
Constants ¶
View Source
const ( HttpMethodGet = "GET" HttpMethodPost = "POST" )
View Source
const ( FinishFlag = "FINISH" JobInfo = "JobInfo:%s" JobStat = "JobStat:%s" JobResp = "JobResp:%s" JobRetry = "JobRetry:%s" )
Variables ¶
View Source
var ( AJF *apiJobFunc ApiMap map[string]map[string]interface{} )
View Source
var ( JM *jobManager CM *cronJobManager )
View Source
var (
LocalHost string
)
Functions ¶
func AgentHBRlt ¶
func AgentListRlt ¶
func DistributeJob ¶
func DistributeJob(jobId string, k, v interface{})
func InitApiMap ¶
func InitApiMap()
func NewApiJobFunc ¶
func NewApiJobFunc() *apiJobFunc
func NewCronJobManager ¶
func NewCronJobManager() *cronJobManager
func NewJobManager ¶
func NewJobManager() *jobManager
Types ¶
type FinishSyncInfo ¶
type FinishSyncInfo struct {
Id string `json:"id"`
}
type Job ¶
type JobResWithArgs ¶
type NewSyncInfo ¶
type SimpleJob ¶
type SimpleJob struct { Id string Name string Mode int Meta map[string]interface{} Workers []string ConNum int Timeout int NeedRes bool //whether save the result to redis //stop job channel Done chan bool // Dis DisJob Do DoJob Rlt DoRlt Rds redis.UniversalClient }
func NewSimpleJob ¶
func (*SimpleJob) Distribute ¶
func (*SimpleJob) RltCallback ¶
type StopSyncInfo ¶
type StopSyncInfo struct {
Id string `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.