Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// ErrNotUpdateJob is returned when a not update job is found.
ErrNotUpdateJob = errors.NewKind("not update job")
)
Functions ¶
Types ¶
type UpdatesProvider ¶
type UpdatesProvider struct {
// contains filtered or unexported fields
}
UpdatesProvider is gitcollector.Provider implementation. It will periodically trigger the gitcollector.Jobs production to update the git repositories hold in a borges.Library
func NewUpdatesProvider ¶
func NewUpdatesProvider( lib borges.Library, queue chan<- gitcollector.Job, opts *UpdatesProviderOpts, ) *UpdatesProvider
NewUpdatesProvider builds a new UpdatesProviders.
func (*UpdatesProvider) Start ¶
func (p *UpdatesProvider) Start() error
Start implements the gitcollector.Provider interface.
func (*UpdatesProvider) Stop ¶
func (p *UpdatesProvider) Stop() error
Stop implements the gitcollector.Provider interface.
type UpdatesProviderOpts ¶
type UpdatesProviderOpts struct {
// TriggerOnce triggers the update just once and exits.
TriggerOnce bool
// TriggerInterval is the time interval elapsed between updates.
TriggerInterval time.Duration
// EnqueueTimeout is the time a job waits to be enqueued.
EnqueueTimeout time.Duration
// StopTimeout is the time the service waits to be stopped after a Stop
// call is performed.
StopTimeout time.Duration
}
UpdatesProviderOpts represents configuration options for an UpdatesProvider.
Click to show internal directories.
Click to hide internal directories.