Documentation
¶
Overview ¶
Package collector is used to collect signals for a given repository from a variety of sources.
Index ¶
Constants ¶
const DefaultGCPDatasetName = "criticality_score_data"
DefaultGCPDatasetName is the default name to use for GCP BigQuery Datasets.
Variables ¶
var ErrUncollectableRepo = errors.New("repo failed")
ErrUncollectableRepo is the error returned when there is a problem with the repo url passed in to be collected.
For example, the URL may point to an invalid repository host, or the URL may point to a repo that is inaccessible or missing.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an interface used to change the config.
func DisableAllSources ¶
func DisableAllSources() Option
DisableAllSources will disable all SourceTypes for collection.
No data sources will be used for collection unless explicitly enabled with EnableSource.
func DisableSource ¶
func DisableSource(s SourceType) Option
DisableSource will enable the supplied SourceType for collection.
func EnableAllSources ¶
func EnableAllSources() Option
EnableAllSources enables all SourceTypes for collection.
All data sources will be used for collection unless explicitly disabled with DisableSource.
func EnableSource ¶
func EnableSource(s SourceType) Option
EnableSource will enable the supplied SourceType for collection.
func GCPDatasetName ¶
GCPDatasetName overrides DefaultGCPDatasetName with the supplied dataset name.
func GCPDatasetTTL ¶
GCPDatasetTTL sets the time-to-live for tables created with GCP BigQuery datasets.
func GCPProject ¶
GCPProject is used to set the ID of the GCP project used for sources that depend on GCP.
If not supplied, the currently configured project will be used.
type SourceType ¶
type SourceType int
SourceType is used to identify the various sources signals can be collected from.
const ( SourceTypeGithubRepo SourceType = iota SourceTypeGithubIssues SourceTypeGitHubMentions SourceTypeDepsDev )
func (SourceType) String ¶
func (t SourceType) String() string
String implements the fmt.Stringer interface.
Directories
¶
Path | Synopsis |
---|---|
Package githubmentions provides a Collector that returns a Set for the number of mentions a given repository has in commit messages as returned by GitHub's search interface.
|
Package githubmentions provides a Collector that returns a Set for the number of mentions a given repository has in commit messages as returned by GitHub's search interface. |