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.
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.
Click to show internal directories.
Click to hide internal directories.