contributor_capture

package
v0.53.0 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: 14 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContributorCaptureMiddleware

func NewContributorCaptureMiddleware(
	config configuration.Configuration,
	sink Sink,
	logger *zerolog.Logger,
) networktypes.MiddlewareFunc

NewContributorCaptureMiddleware returns a middleware that wraps a round tripper with contributor capture logic, for registration via NetworkAccess.AddMiddleware.

Types

type ContributorCaptureMiddleware

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

ContributorCaptureMiddleware inspects product API requests and responses and reports captured entity IDs (currently project IDs) to an injected Sink.

func (*ContributorCaptureMiddleware) RoundTrip

type Sink

type Sink interface {
	RecordEntity(entityType contributors.EntityType, entityID string)
	RecordMiss(reason contributors.MissReason)
}

Sink is the mechanism by which this middleware reports captured entities. It is call synchronously from the middleware, and so is required to be fast and non-blocking.

Jump to

Keyboard shortcuts

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