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
$ oci fn function update \ | |
--function-id= ocid1.fnfunc.oc1.phx... \ | |
--image=phx.ocir.io/toddrsharp/atp-auto-wallet/atp-auto-wallet-fn-native:0.3 |
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
$ oci fn function update \ | |
--function-id= ocid1.fnfunc.oc1.phx... \ | |
--image=phx.ocir.io/toddrsharp/atp-auto-wallet/atp-auto-wallet-fn:0.2 |
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
@Singleton | |
public class Function extends OciFunction { | |
@Inject | |
TenancyIdProvider tenantIdProvider; | |
@ReflectiveAccess | |
public String handleRequest() { | |
String tenancyId = tenantIdProvider.getTenancyId(); | |
return "Your tenancy is: " + tenancyId; | |
} |
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
$ oci fn application create \ | |
--display-name=atp-wallet-demo \ | |
--subnet-ids='["'$OCI_FAAS_SUBNET'"]' \ | |
--compartment-id=$OCI_FAAS_COMPARTMENT |
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
$ ./gradlew dockerBuildNative | |
$ ./gradlew dockerPushNative |
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
#non-native | |
0.53s user 0.22s system 4% cpu 18.521 total | |
#native | |
0.48s user 0.18s system 8% cpu 8.315 total |
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
@Singleton | |
public class Function extends OciFunction { | |
@Inject | |
DataSource dataSource; | |
@ReflectiveAccess | |
public String handleRequest() throws SQLException, JsonProcessingException { | |
Connection conn = dataSource.getConnection(); | |
Statement statement = conn.createStatement(); | |
ResultSet resultSet = statement.executeQuery("select id, first_name, last_name from users"); |
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
micronaut: | |
application: | |
name: atpAutoWalletFn | |
config-client: | |
enabled: true | |
oci: | |
vault: | |
config: | |
enabled: true | |
vaults: |
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
#non-native | |
0.49s user 0.18s system 25% cpu 2.590 total | |
#native | |
0.45s user 0.16s system 30% cpu 2.042 total |
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
dockerBuild { | |
images = ["[REGION].ocir.io/[TENANCY]/[REPO]/$project.name:$project.version"] | |
} | |
dockerBuildNative { | |
images = ["[REGION].ocir.io/[TENANCY]/[REPO]/$project.name-native:$project.version"] | |
} |