Documentation ¶
Overview ¶
Package internal provides internal structures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPermanentError ¶
IsPermanentError returns true if the error is non-retriable.
Types ¶
type FileLock ¶
type FileLock struct {
// contains filtered or unexported fields
}
FileLock provides a file lock mechanism based on flock.
func NewFileLock ¶
NewFileLock creates a new instance of FileLock.
type JobProcessor ¶
type JobProcessor struct {
// contains filtered or unexported fields
}
JobProcessor runs jobs with a set number of workers.
func NewJobProcessor ¶
func NewJobProcessor(ctx context.Context, workers int) *JobProcessor
NewJobProcessor inits a new JobProcessor struct.
func (*JobProcessor) Add ¶
func (j *JobProcessor) Add(job func(context.Context) error)
Add queues a job for processing.
func (*JobProcessor) Run ¶
func (j *JobProcessor) Run(ctx context.Context) error
Run processes the job queue and returns the first error encountered, if any.
func (*JobProcessor) Wait ¶
func (j *JobProcessor) Wait() error
Wait waits for all jobs to finish processing and returns the first error encountered, if any.
Directories ¶
Path | Synopsis |
---|---|
Package geoipupdate provides a library for using MaxMind's GeoIP Update service.
|
Package geoipupdate provides a library for using MaxMind's GeoIP Update service. |
database
Package database writes MMDBs to disk.
|
Package database writes MMDBs to disk. |
Package vars holds random vars, consts, and defaults.
|
Package vars holds random vars, consts, and defaults. |
Click to show internal directories.
Click to hide internal directories.