Documentation ¶
Index ¶
- Variables
- func NewDevCollector(gs []*GitHubCollector) prometheus.Collector
- func NewGitHubClient(ctx context.Context) (*github.Client, error)
- func RecordMetrics(gs []*GitHubCollector)
- type Dispatcher
- type GitHubCollector
- func (g *GitHubCollector) GetIssuesByRepo(repoName string) ([]*github.Issue, error)
- func (g *GitHubCollector) GetOrg() (*github.Organization, error)
- func (g *GitHubCollector) GetPullRequestsByRepo(repoName string) ([]*github.PullRequest, error)
- func (g *GitHubCollector) GetReposByOrg() ([]*github.Repository, error)
- type Job
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// save github data for api limit.
Kv *cache.Cache
)
Functions ¶
func NewDevCollector ¶
func NewDevCollector(gs []*GitHubCollector) prometheus.Collector
func NewGitHubClient ¶
NewGitHubClient constructor
func RecordMetrics ¶
func RecordMetrics(gs []*GitHubCollector)
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(worker Worker) *Dispatcher
func (*Dispatcher) Add ¶
func (d *Dispatcher) Add(job *Job)
func (*Dispatcher) Start ¶
func (d *Dispatcher) Start(ctx context.Context)
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
func (*Dispatcher) Wait ¶
func (d *Dispatcher) Wait()
type GitHubCollector ¶
type GitHubCollector struct {
// contains filtered or unexported fields
}
func NewGitHubCollector ¶
func NewGitHubCollector(org string) *GitHubCollector
func (*GitHubCollector) GetIssuesByRepo ¶
func (g *GitHubCollector) GetIssuesByRepo(repoName string) ([]*github.Issue, error)
func (*GitHubCollector) GetOrg ¶
func (g *GitHubCollector) GetOrg() (*github.Organization, error)
func (*GitHubCollector) GetPullRequestsByRepo ¶
func (g *GitHubCollector) GetPullRequestsByRepo(repoName string) ([]*github.PullRequest, error)
func (*GitHubCollector) GetReposByOrg ¶
func (g *GitHubCollector) GetReposByOrg() ([]*github.Repository, error)
Click to show internal directories.
Click to hide internal directories.