Documentation ¶
Index ¶
- type ProviderFailure
- type Snapshot
- func (snapshot *Snapshot) CollectFrom(pro []providers.Provider, collector func(job *providers.Job), ...)
- func (snapshot *Snapshot) Collector() func(job *providers.Job)
- func (snapshot *Snapshot) Erase()
- func (snapshot *Snapshot) RetrieveJobs(fn func(job *providers.Job)) error
- func (snapshot *Snapshot) Save() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderFailure ¶
ProviderFailure refers to an error occurred in a provider
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot helps you to collect and store your scrapped jobs
func (*Snapshot) CollectFrom ¶
func (snapshot *Snapshot) CollectFrom(pro []providers.Provider, collector func(job *providers.Job), fn func(int, *ProviderFailure))
CollectFrom a slice of providers
func (*Snapshot) Collector ¶
Collector returns a thread-safe function to use with a provider
Example :
snap := snapshot.NewSnapshot("./test") p.RetrieveJobs(snap.Collector())
func (*Snapshot) RetrieveJobs ¶
RetrieveJobs replays your snapshot jobs
Click to show internal directories.
Click to hide internal directories.