Documentation ¶
Overview ¶
Package gerrit implements a gerrit-fetcher using https://github.com/andygrunwald/go-gerrit
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller manages gerrit changes.
func NewController ¶
func NewController(instance, storage string, projects []string, kc *kube.Client, ca *config.Agent) (*Controller, error)
NewController returns a new gerrit controller client
func (*Controller) Auth ¶
func (c *Controller) Auth() error
Auth authenticates to gerrit server Token will expire, so we need to regenerate it once so often
func (*Controller) ProcessChange ¶
func (c *Controller) ProcessChange(change gerrit.ChangeInfo) error
ProcessChange creates new presubmit prowjobs base off the gerrit changes
func (*Controller) QueryChanges ¶
func (c *Controller) QueryChanges() []gerrit.ChangeInfo
QueryChanges will query all valid gerrit changes since controller's last sync loop
func (*Controller) SaveLastSync ¶
func (c *Controller) SaveLastSync(lastSync time.Time) error
SaveLastSync saves last sync time in Unix to a volume
func (*Controller) Sync ¶
func (c *Controller) Sync() error
Sync looks for newly made gerrit changes and creates prowjobs according to presubmit specs
Click to show internal directories.
Click to hide internal directories.