adapter

package
v0.0.0-...-8f1101b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Overview

Package adapter implements a controller that interacts with gerrit instances

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRefs

func CreateRefs(instance, project, branch, baseSHA string, changes ...client.ChangeInfo) (prowapi.Refs, error)

CreateRefs creates refs for a presubmit job from given changes.

Passed in instance must contain https:// prefix.

func LabelsAndAnnotations

func LabelsAndAnnotations(instance string, jobLabels, jobAnnotations map[string]string, changes ...client.ChangeInfo) (labels, annotations map[string]string)

Types

type Change

type Change struct {
	// contains filtered or unexported fields
}

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller manages gerrit changes.

func NewController

func NewController(ctx context.Context, prowJobClient prowv1.ProwJobInterface, op io.Opener,
	ca *config.Agent, cookiefilePath, tokenPathOverride, lastSyncFallback string, workerPoolSize int, maxQPS, maxBurst int, ircg config.InRepoConfigGetter) *Controller

NewController returns a new gerrit controller client

func (*Controller) Sync

func (c *Controller) Sync()

Sync looks for newly made gerrit changes and creates prowjobs according to specs

type LastSyncTracker

type LastSyncTracker interface {
	Current() client.LastSyncState
	Update(client.LastSyncState) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL