contributor_capture

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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)
}

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