Documentation ¶
Index ¶
- type JobCreator
- func (jc *JobCreator) Close() error
- func (jc *JobCreator) HandleRepoUpdate(ctx context.Context, repoUrl string, g *repograph.Graph, ack, nack func()) error
- func (jc *JobCreator) MaybeTriggerPeriodicJobs(ctx context.Context, triggerName string) error
- func (jc *JobCreator) Start(ctx context.Context, enableTryjobs bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobCreator ¶
type JobCreator struct {
// contains filtered or unexported fields
}
JobCreator is a struct used for creating Jobs based on new commits, tryjobs, and timed triggers.
func NewJobCreator ¶
func NewJobCreator(ctx context.Context, d db.DB, period time.Duration, numCommits int, workdir, host string, repos repograph.Map, rbe cas.CAS, c *http.Client, buildbucketProject, buildbucketTarget, buildbucketBucket string, projectRepoMapping map[string]string, depotTools string, gerrit gerrit.GerritInterface, taskCfgCache task_cfg_cache.TaskCfgCache, pubsubClient pubsub.Client, numSyncWorkers int) (*JobCreator, error)
NewJobCreator returns a JobCreator instance.
func (*JobCreator) Close ¶
func (jc *JobCreator) Close() error
Close cleans up resources used by the JobCreator.
func (*JobCreator) HandleRepoUpdate ¶
func (jc *JobCreator) HandleRepoUpdate(ctx context.Context, repoUrl string, g *repograph.Graph, ack, nack func()) error
HandleRepoUpdate is a pubsub.AutoUpdateMapCallback which is called when any of the repos is updated.
func (*JobCreator) MaybeTriggerPeriodicJobs ¶
func (jc *JobCreator) MaybeTriggerPeriodicJobs(ctx context.Context, triggerName string) error
MaybeTriggerPeriodicJobs triggers all periodic jobs with the given trigger name, if those jobs haven't already been triggered.
Click to show internal directories.
Click to hide internal directories.