-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support S3 Express One Zone #1033
Conversation
...e/auth/aws-signing-crt/jvm/src/aws/smithy/kotlin/runtime/auth/awssigning/crt/CrtAwsSigner.kt
Outdated
Show resolved
Hide resolved
*/ | ||
@InternalApi | ||
public class Md5ChecksumInterceptor<I>( | ||
private val block: ((input: I) -> Boolean)? = null, | ||
) : HttpInterceptor { | ||
private var cachedChecksum: String? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand what would break. Md5ChecksumInterceptor
and FlexibleChecksumsRequestIntereceptor
are final so it seems like users can't create their own custom implementations.
...http-client/common/src/aws/smithy/kotlin/runtime/http/interceptors/Md5ChecksumInterceptor.kt
Outdated
Show resolved
Hide resolved
...e/auth/aws-signing-crt/jvm/src/aws/smithy/kotlin/runtime/auth/awssigning/crt/CrtAwsSigner.kt
Outdated
Show resolved
Hide resolved
...client/common/src/aws/smithy/kotlin/runtime/http/interceptors/AbstractChecksumInterceptor.kt
Show resolved
Hide resolved
...client/common/src/aws/smithy/kotlin/runtime/http/interceptors/AbstractChecksumInterceptor.kt
Outdated
Show resolved
Hide resolved
public class LruCache<K, V>( | ||
public val capacity: Int, | ||
) { | ||
private val mu = Mutex() // protects map |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: What if we just made this cache explicitly not thread safe and make synchronization a higher level concern? That would make things like entries
and other fields thread safe if needed and allow locking to be at whatever granularity makes sense.
Just a thought.
…ing` to handle input changing through interceptors
…ing` to handle input changing through interceptors
Quality Gate passedIssues Measures |
Adds some features in order to support the SDK making S3 Express requests
Issue #
Description of changes
HttpOperationContext.ChecksumAlgorithm
. The value is the name of the checksum algorithm to be used. If it's set when flexible checksums runs, it will be used, otherwise theContent-MD5
header will be computed and added as before. This greatly simplifies the logic required in these interceptors.omitSessionToken
signing configuration via execution context, using theAwsSigningAttributes. OmitSessionToken
key.LruCache
which holds entries up to a configurablecapacity
and then evicts the least-recently used entries as more are added.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.