Skip to content

Commit

Permalink
add comment to exported type
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianyi Wang committed Dec 9, 2024
1 parent 24c37b1 commit 7dde0a9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ var supportedChecksumFeatures = map[Algorithm]awsmiddleware.UserAgentFeature{
AlgorithmCRC64NVME: awsmiddleware.UserAgentFeatureRequestChecksumCRC64,
}

// RequestChecksumMetricsTracking is the middleware to track operation request's checksum usage
type RequestChecksumMetricsTracking struct {
RequestChecksumCalculation aws.RequestChecksumCalculation
UserAgent *awsmiddleware.RequestUserAgent
}

// ID provides the middleware identifier
func (m *RequestChecksumMetricsTracking) ID() string {
return "AWSChecksum:RequestMetricsTracking"
}

// HandleBuild checks request checksum config and checksum value sent
// and sends corresponding feature id to user agent
func (m *RequestChecksumMetricsTracking) HandleBuild(
ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
) (
Expand Down Expand Up @@ -53,15 +57,18 @@ func (m *RequestChecksumMetricsTracking) HandleBuild(
return next.HandleBuild(ctx, in)
}

// ResponseChecksumMetricsTracking is the middleware to track operation response's checksum usage
type ResponseChecksumMetricsTracking struct {
ResponseChecksumValidation aws.ResponseChecksumValidation
UserAgent *awsmiddleware.RequestUserAgent
}

// ID provides the middleware identifier
func (m *ResponseChecksumMetricsTracking) ID() string {
return "AWSChecksum:ResponseMetricsTracking"
}

// HandleBuild checks the response checksum config and sends corresponding feature id to user agent
func (m *ResponseChecksumMetricsTracking) HandleBuild(
ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
) (
Expand Down

0 comments on commit 7dde0a9

Please sign in to comment.