mirror of
https://github.com/jlengrand/quarkus.git
synced 2026-03-10 08:41:22 +00:00
Move amazon-lambda build time config flag to buidl time class
This commit is contained in:
committed by
Guillaume Smet
parent
bbdde15fc6
commit
744fa41d97
@@ -21,6 +21,7 @@ import com.amazonaws.services.lambda.runtime.RequestHandler;
|
||||
|
||||
import io.quarkus.amazon.lambda.runtime.AmazonLambdaRecorder;
|
||||
import io.quarkus.amazon.lambda.runtime.FunctionError;
|
||||
import io.quarkus.amazon.lambda.runtime.LambdaBuildTimeConfig;
|
||||
import io.quarkus.amazon.lambda.runtime.LambdaConfig;
|
||||
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
|
||||
import io.quarkus.arc.deployment.BeanContainerBuildItem;
|
||||
@@ -196,7 +197,7 @@ public final class AmazonLambdaProcessor {
|
||||
|
||||
@BuildStep
|
||||
@Record(value = ExecutionTime.RUNTIME_INIT)
|
||||
void enableNativeEventLoop(LambdaConfig config,
|
||||
void enableNativeEventLoop(LambdaBuildTimeConfig config,
|
||||
AmazonLambdaRecorder recorder,
|
||||
List<ServiceStartBuildItem> orderServicesFirst, // force some ordering of recorders
|
||||
ShutdownContextBuildItem shutdownContextBuildItem,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package io.quarkus.amazon.lambda.runtime;
|
||||
|
||||
import io.quarkus.runtime.annotations.ConfigItem;
|
||||
import io.quarkus.runtime.annotations.ConfigPhase;
|
||||
import io.quarkus.runtime.annotations.ConfigRoot;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
|
||||
public class LambdaBuildTimeConfig {
|
||||
|
||||
/**
|
||||
* If true, this will enable the aws event poll loop within a Quarkus test run. This loop normally only runs in native
|
||||
* image. This option is strictly for testing purposes.
|
||||
*
|
||||
*/
|
||||
@ConfigItem
|
||||
public boolean enablePollingJvmMode;
|
||||
}
|
||||
@@ -20,13 +20,4 @@ public class LambdaConfig {
|
||||
*/
|
||||
@ConfigItem
|
||||
public Optional<String> handler;
|
||||
|
||||
/**
|
||||
* If true, this will enable the aws event poll loop within a Quarkus test run. This loop normally only runs in native
|
||||
* image. This option is strictly for testing purposes.
|
||||
*
|
||||
*/
|
||||
@ConfigItem
|
||||
public boolean enablePollingJvmMode;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user