Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { FilePath string File fileheader.FileHeader }
type Processor ¶
type Processor struct { ProcessTimeout time.Duration MaxWorkers int // contains filtered or unexported fields }
Processor processes jobs concurrently
func New ¶
func New(workerFn func(job Job) (interface{}, error), maxWorkers int, processTimeout time.Duration) *Processor
New returns a new instance of Processor
func (*Processor) Do ¶
func (p *Processor) Do(ctx context.Context, jobCh chan Job, jobCount int) ([]ResultSuccess, []ResultError)
Process processes files and extracts file metadata
type ResultError ¶
ResultError stores error data
type ResultSuccess ¶
type ResultSuccess struct { FilePath string Output interface{} }
ResultError stores success data
Click to show internal directories.
Click to hide internal directories.