Documentation
¶
Index ¶
- func NewJobTaskBuilder(store Store) *jobGroupBuilder
- type Job
- type JobFunc
- type JobGroup
- type JobStatus
- type KeyGenerator
- type LocalStore
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJobTaskBuilder ¶
func NewJobTaskBuilder(store Store) *jobGroupBuilder
Types ¶
type Job ¶
type Job struct {
JobID string
GroupID string
BeginTime string
EndTime string
Timeout time.Duration
Seq int
Status JobStatus
FnIn lang.AnyType
FnOut lang.AnyType
// contains filtered or unexported fields
}
func (*Job) UpdateStatus ¶
type JobGroup ¶
type JobGroup struct {
GroupID string
CreateTime string
Jobs []*Job
JobCount int
Sync bool
// contains filtered or unexported fields
}
type KeyGenerator ¶
type KeyGenerator interface {
Generate() []byte
}
func NewTimeBasedRandomGenerator ¶
func NewTimeBasedRandomGenerator(length int) KeyGenerator
type LocalStore ¶
type LocalStore struct {
// contains filtered or unexported fields
}
func (*LocalStore) Clear ¶
func (s *LocalStore) Clear() error
func (*LocalStore) Delete ¶
func (s *LocalStore) Delete(jobID string) error
func (*LocalStore) GetStatus ¶
func (s *LocalStore) GetStatus(jobID string) int
func (*LocalStore) UpdateStatus ¶
func (s *LocalStore) UpdateStatus(jobID string, status int) error
type Store ¶
type Store interface {
Add(grpID string, jobID string, data lang.AnyType) error
Get(jobID string) (lang.AnyType, bool)
GetAll(grpID string) []lang.AnyType
GetStatus(jobID string) int
Update(jobID string, data lang.AnyType) error
UpdateStatus(jobID string, status int) error
Delete(jobID string) error
Clear() error
}
func NewLocalStore ¶
func NewLocalStore() Store
Click to show internal directories.
Click to hide internal directories.