-
Notifications
You must be signed in to change notification settings - Fork 82
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
80 changed files
with
1,467 additions
and
217 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,14 +45,14 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: "🔧 Setup GraalVM CE" | ||
uses: graalvm/[email protected].1 | ||
uses: graalvm/[email protected].6 | ||
with: | ||
distribution: 'graalvm' | ||
java-version: ${{ matrix.java }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "🔧 Setup Gradle" | ||
uses: gradle/gradle-build-action@v3.1.0 | ||
uses: gradle/gradle-build-action@v3.5.0 | ||
|
||
- name: "❓ Optional setup step" | ||
run: | | ||
|
@@ -70,15 +70,15 @@ jobs: | |
- name: "📊 Publish Test Report" | ||
if: always() | ||
uses: mikepenz/action-junit-report@v4 | ||
uses: mikepenz/action-junit-report@v5 | ||
with: | ||
check_name: Java CI / Test Report (${{ matrix.java }}) | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
check_retries: 'true' | ||
|
||
- name: "📜 Upload binary compatibility check results" | ||
if: matrix.java == '17' | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | ||
with: | ||
name: binary-compatibility-reports | ||
path: "**/build/reports/binary-compatibility-*.html" | ||
|
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
94 changes: 94 additions & 0 deletions
94
aws-sdk-v2/src/main/java/io/micronaut/aws/sdk/v2/service/lambda/LambdaClientFactory.java
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,94 @@ | ||
/* | ||
* Copyright 2017-2024 original authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.micronaut.aws.sdk.v2.service.lambda; | ||
|
||
import io.micronaut.aws.sdk.v2.service.AWSServiceConfiguration; | ||
import io.micronaut.aws.sdk.v2.service.AwsClientFactory; | ||
import io.micronaut.aws.ua.UserAgentProvider; | ||
import io.micronaut.context.annotation.Bean; | ||
import io.micronaut.context.annotation.Factory; | ||
import io.micronaut.context.annotation.Requires; | ||
import io.micronaut.core.annotation.Nullable; | ||
import jakarta.inject.Named; | ||
import jakarta.inject.Singleton; | ||
import software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain; | ||
import software.amazon.awssdk.http.SdkHttpClient; | ||
import software.amazon.awssdk.http.async.SdkAsyncHttpClient; | ||
import software.amazon.awssdk.regions.providers.AwsRegionProviderChain; | ||
import software.amazon.awssdk.services.lambda.LambdaAsyncClient; | ||
import software.amazon.awssdk.services.lambda.LambdaAsyncClientBuilder; | ||
import software.amazon.awssdk.services.lambda.LambdaClient; | ||
import software.amazon.awssdk.services.lambda.LambdaClientBuilder; | ||
|
||
/** | ||
* Factory that creates {@link LambdaClient} and {@link LambdaAsyncClient}. | ||
* @since 4.7.0 | ||
*/ | ||
@Factory | ||
class LambdaClientFactory extends AwsClientFactory<LambdaClientBuilder, LambdaAsyncClientBuilder, LambdaClient, LambdaAsyncClient> { | ||
/** | ||
* Constructor. | ||
* | ||
* @param credentialsProvider The credentials provider | ||
* @param regionProvider The region provider | ||
* @param userAgentProvider User-Agent Provider | ||
* @param awsServiceConfiguration AWS Service Configuration | ||
*/ | ||
protected LambdaClientFactory(AwsCredentialsProviderChain credentialsProvider, | ||
AwsRegionProviderChain regionProvider, | ||
@Nullable UserAgentProvider userAgentProvider, | ||
@Nullable @Named(LambdaClient.SERVICE_NAME) AWSServiceConfiguration awsServiceConfiguration) { | ||
super(credentialsProvider, regionProvider, userAgentProvider, awsServiceConfiguration); | ||
} | ||
|
||
@Override | ||
protected LambdaClientBuilder createSyncBuilder() { | ||
return LambdaClient.builder(); | ||
} | ||
|
||
@Override | ||
protected LambdaAsyncClientBuilder createAsyncBuilder() { | ||
return LambdaAsyncClient.builder(); | ||
} | ||
|
||
@Override | ||
@Singleton | ||
public LambdaClientBuilder syncBuilder(SdkHttpClient httpClient) { | ||
return super.syncBuilder(httpClient); | ||
} | ||
|
||
@Override | ||
@Bean(preDestroy = "close") | ||
@Singleton | ||
public LambdaClient syncClient(LambdaClientBuilder builder) { | ||
return super.syncClient(builder); | ||
} | ||
|
||
@Override | ||
@Singleton | ||
@Requires(beans = SdkAsyncHttpClient.class) | ||
public LambdaAsyncClientBuilder asyncBuilder(SdkAsyncHttpClient httpClient) { | ||
return super.asyncBuilder(httpClient); | ||
} | ||
|
||
@Override | ||
@Bean(preDestroy = "close") | ||
@Singleton | ||
@Requires(beans = SdkAsyncHttpClient.class) | ||
public LambdaAsyncClient asyncClient(LambdaAsyncClientBuilder builder) { | ||
return super.asyncClient(builder); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
aws-sdk-v2/src/main/java/io/micronaut/aws/sdk/v2/service/lambda/package-info.java
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,28 @@ | ||
/* | ||
* Copyright 2017-2024 original authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* Lambda client factory. | ||
* @author Luis Duarte | ||
* @since 4.7.0 | ||
*/ | ||
@Requires(classes = {LambdaClient.class, LambdaAsyncClient.class}) | ||
@Configuration | ||
package io.micronaut.aws.sdk.v2.service.lambda; | ||
|
||
import io.micronaut.context.annotation.Configuration; | ||
import io.micronaut.context.annotation.Requires; | ||
import software.amazon.awssdk.services.lambda.LambdaAsyncClient; | ||
import software.amazon.awssdk.services.lambda.LambdaClient; |
17 changes: 0 additions & 17 deletions
17
...urces/META-INF/native-image/io.micronaut.aws/micronaut-aws-sdk-v2/native-image.properties
This file was deleted.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
aws-sdk-v2/src/test/groovy/io/micronaut/aws/sdk/v2/service/LambdaClientSpec.groovy
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,20 @@ | ||
package io.micronaut.aws.sdk.v2.service | ||
|
||
import software.amazon.awssdk.services.lambda.LambdaAsyncClient | ||
import software.amazon.awssdk.services.lambda.LambdaClient | ||
|
||
class LambdaClientSpec extends ServiceClientSpec<LambdaClient, LambdaAsyncClient> { | ||
@Override | ||
protected String serviceName() { | ||
return LambdaClient.SERVICE_NAME | ||
} | ||
|
||
@Override | ||
protected LambdaClient getClient() { | ||
applicationContext.getBean(LambdaClient) | ||
} | ||
|
||
protected LambdaAsyncClient getAsyncClient() { | ||
applicationContext.getBean(LambdaAsyncClient) | ||
} | ||
} |
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
Oops, something went wrong.