Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUpdatesStopped is returned when a provider has been stopped. ErrUpdatesStopped = errors.NewKind("provider stopped") // ErrUpdatesStop is returned when a provider fails on Stop. ErrUpdatesStop = errors.NewKind("provider failed on stop") )
Functions ¶
func AdvertiseGHRepositoriesOnJobQueue ¶
func AdvertiseGHRepositoriesOnJobQueue( queue chan<- gitcollector.Job, ) discovery.AdvertiseGHRepositoriesFn
AdvertiseGHRepositoriesOnJobQueue sends the discovered repositories as a gitcollector.Jobs to the given channel. It makes a discovery.GitHub plays as a gitcollector.Provider
func NewGitHubOrg ¶
func NewGitHubOrg( org string, authToken string, queue chan<- gitcollector.Job, opts *discovery.GitHubOpts, ) *discovery.GitHub
NewGitHubOrg builds a new gitcollector.Provider based on a discovery.Github.
Types ¶
type Updates ¶
type Updates struct {
// contains filtered or unexported fields
}
Updates is a gitcollector.Provider implementation. It will periodically trigger the gitcollector.Jobs production to update the git repositories hold in a borges.Library
func NewUpdates ¶
func NewUpdates( lib borges.Library, queue chan<- gitcollector.Job, opts *UpdatesOpts, ) *Updates
NewUpdates builds a new Updates.
type UpdatesOpts ¶
type UpdatesOpts 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
}
UpdatesOpts represents configuration options for an Updates.
Click to show internal directories.
Click to hide internal directories.