Documentation ¶
Index ¶
- func DiskFactory() provider.Provider
- func NewLocker() *locker
- type Disk
- func (d *Disk) Close() error
- func (d *Disk) ConfigStruct() interface{}
- func (d *Disk) ConfirmJob(j job.Job) error
- func (d *Disk) Init(i interface{}) error
- func (d *Disk) Name() string
- func (d *Disk) RequestWork(n int, jobChan chan job.Job) error
- func (d *Disk) Target() float64
- func (d *Disk) WaitTime(target float64) time.Duration
- type DiskConfig
- type DiskJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiskFactory ¶
DiskFactory create and return a disk provider
Types ¶
type Disk ¶
type Disk struct {
// contains filtered or unexported fields
}
Disk a provider that uses a bolt db on disk as it's repository of jobs
func (*Disk) ConfirmJob ¶
ConfirmJob remove the job from the temporary list
func (*Disk) RequestWork ¶
RequestWork collect work from the database
type DiskConfig ¶
type DiskConfig struct { Name string `json:"name" required:"true"` Target float64 `json:"target" required:"false"` DBName string `json:"db_name" required:"false"` Bucket string `json:"bucket" required:"true"` }
DiskConfig the config struct used to set up the provider
type DiskJob ¶
type DiskJob struct {
// contains filtered or unexported fields
}
DiskJob a job that points back to a disk provider
func (*DiskJob) JobConfirmer ¶
func (d *DiskJob) JobConfirmer() job.JobConfirmer
JobConfirmer return the provider this job points back to
Click to show internal directories.
Click to hide internal directories.