postaction

package
v0.0.0-...-9816dab Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package postaction executes post actions for run termination events.

Index

Constants

View Source
const CreditRunQuotaPostActionName = "credit-run-quota"

CreditRunQuotaPostActionName is the name of the internal post action that credits the run quota after the provided run is ended.

Variables

This section is empty.

Functions

func IsTriggeringConditionMet

func IsTriggeringConditionMet(act *cfgpb.ConfigGroup_PostAction, r *run.Run) bool

IsTriggeringConditionMet returns true if at least one of the triggering conditions in a given PostAction config is met.

Types

type Executor

type Executor struct {
	GFactory          gerrit.Factory
	Run               *run.Run
	Payload           *run.OngoingLongOps_Op_ExecutePostActionPayload
	RM                rm
	QM                qm
	IsCancelRequested func() bool
	// contains filtered or unexported fields
}

Executor executes a PostAction for a Run termination event.

func (*Executor) Do

func (exe *Executor) Do(ctx context.Context) (string, error)

Do executes the payload.

Returns a summary of the action execution, and the error. The summary is meant to be added to run.LogEntries.

Jump to

Keyboard shortcuts

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