forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
137 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# AWS Middleware | ||
|
||
An AWS middleware extension provides request and/or response handlers that can be configured on AWS SDK v1/v2 clients. | ||
Other components can configure their AWS SDK clients using the `awsmiddleware.ConfigureSDKv1` and `awsmiddleware.ConfigureSDKv2` functions. | ||
|
||
The `awsmiddleware.Extension` interface extends `component.Extension` by adding the following methods: | ||
``` | ||
RequestHandlers() []RequestHandler | ||
ResponseHandlers() []ResponseHandler | ||
``` | ||
|
||
The `awsmiddleware.RequestHandler` interface contains the following methods: | ||
``` | ||
ID() string | ||
Position() HandlerPosition | ||
HandleRequest(r *http.Request) | ||
``` | ||
|
||
The `awsmiddleware.ResponseHandler` interface contains the following methods: | ||
``` | ||
ID() string | ||
Position() HandlerPosition | ||
HandleResponse(r *http.Response) | ||
``` | ||
|
||
- `ID` uniquely identifies a handler. Middleware will fail if there is clashing | ||
- `Position` determines whether the handler is appended to the front or back of the existing list. Insertion is done | ||
in the order of the handlers provided. | ||
- `HandleRequest/Response` provides a hook to handle the request/response before and after they've been sent. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters