report

package
v1.78.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package report stores the Report of one package or of Global.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

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

Reporter stores one Report and calls notify after every change, outside the lock. Each section has one writer: Current or Global writes the Current section (UpdateCurrent), the package Reconciler the rest. The writers reach it through their own narrow interfaces, so the compiler keeps them out of each other's sections. The reader is Engine.Report (Snapshot). Safe for concurrent use.

func New

func New(notify func()) *Reporter

New returns an empty Reporter; notify nil notifies nobody.

func (*Reporter) SetActivated

func (r *Reporter) SetActivated(version string)

SetActivated records the activated version and clears the Candidate section and the notification in one write, so no reader sees the activated version as a pending candidate or still announced.

func (*Reporter) SetCandidate

func (r *Reporter) SetCandidate(ur model.CandidateReport)

SetCandidate replaces the Candidate section; a repeated blocker or failure changes nothing.

func (*Reporter) SetNotified

func (r *Reporter) SetNotified(notified model.Notified)

SetNotified records the notification sent for the pending update.

func (*Reporter) SetRemoveError

func (r *Reporter) SetRemoveError(msg string)

SetRemoveError replaces RemoveError; "" clears it.

func (*Reporter) SetRemoved

func (r *Reporter) SetRemoved()

SetRemoved marks the package removed.

func (*Reporter) Snapshot

func (r *Reporter) Snapshot() model.Report

Snapshot returns a copy of the Report.

func (*Reporter) UpdateCurrent

func (r *Reporter) UpdateCurrent(f func(*model.CurrentReport))

UpdateCurrent applies f to the Current section under the lock, so a loop and its worker (the ApplyingManifests mark) never lose each other's write.

Jump to

Keyboard shortcuts

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