Versions in this module Expand all Collapse all v1 v1.2.2 Mar 30, 2023 Changes in this version type JobGroup + func (t *JobGroup) Keys() []string v1.2.1 Mar 27, 2023 Changes in this version + func NewJobTaskBuilder(store Store) *jobGroupBuilder + type Job struct + BeginTime string + EndTime string + FnIn lang.AnyType + FnOut lang.AnyType + GroupID string + JobID string + Seq int + Status JobStatus + Timeout time.Duration + func (j *Job) Run(store Store) + func (j *Job) RunLocked(store Store) + func (j *Job) UpdateStatus(store Store, status JobStatus) + type JobFunc func(jobID string, in lang.AnyType, out *lang.AnyType) error + type JobGroup struct + CreateTime string + GroupID string + JobCount int + Jobs []*Job + Sync bool + func (t *JobGroup) CreateJob(fx JobFunc, fnin lang.AnyType, timeout time.Duration) (jobID string) + func (t *JobGroup) Get(jobID string) (lang.AnyType, bool) + func (t *JobGroup) GetAll(grpID string) []lang.AnyType + func (t *JobGroup) Run() + type JobStatus int8 + const JOB_STATUS_CREATED + const JOB_STATUS_FAILED + const JOB_STATUS_RUNNING + const JOB_STATUS_SUCCESS + const JOB_STATUS_TIMEOUT + func (i JobStatus) String() string + type KeyGenerator interface + Generate func() []byte + func NewTimeBasedRandomGenerator(length int) KeyGenerator + type LocalStore struct + func (s *LocalStore) Add(grpID string, jobID string, data lang.AnyType) error + func (s *LocalStore) Clear() error + func (s *LocalStore) Delete(jobID string) error + func (s *LocalStore) Get(jobID string) (lang.AnyType, bool) + func (s *LocalStore) GetAll(grpID string) []lang.AnyType + func (s *LocalStore) GetStatus(jobID string) int + func (s *LocalStore) Update(jobID string, data lang.AnyType) error + func (s *LocalStore) UpdateStatus(jobID string, status int) error + type Store interface + Add func(grpID string, jobID string, data lang.AnyType) error + Clear func() error + Delete func(jobID string) error + Get func(jobID string) (lang.AnyType, bool) + GetAll func(grpID string) []lang.AnyType + GetStatus func(jobID string) int + Update func(jobID string, data lang.AnyType) error + UpdateStatus func(jobID string, status int) error + func NewLocalStore() Store