-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #439 from zZHorizonZz/devservices
feature(devservices): added pubsub dev service
- Loading branch information
Showing
10 changed files
with
324 additions
and
26 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
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
22 changes: 22 additions & 0 deletions
22
...ain/java/io/quarkiverse/googlecloudservices/pubsub/deployement/PubSubBuildTimeConfig.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,22 @@ | ||
package io.quarkiverse.googlecloudservices.pubsub.deployement; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
|
||
/** | ||
* Root configuration class for Google Cloud Pub/Sub that operates at build time. | ||
* This class provides a nested structure for configuration, including | ||
* a separate group for the development service configuration. | ||
*/ | ||
@ConfigRoot(name = "google.cloud.pubsub", phase = ConfigPhase.BUILD_TIME) | ||
public class PubSubBuildTimeConfig { | ||
|
||
/** | ||
* Configuration for the Pub/Sub development service. | ||
* These settings will be used when Pub/Sub service is being configured | ||
* for development purposes. | ||
*/ | ||
@ConfigItem | ||
public PubSubDevServiceConfig devservice; | ||
} |
44 changes: 44 additions & 0 deletions
44
...in/java/io/quarkiverse/googlecloudservices/pubsub/deployement/PubSubDevServiceConfig.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,44 @@ | ||
package io.quarkiverse.googlecloudservices.pubsub.deployement; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
import io.quarkus.runtime.annotations.ConfigItem; | ||
|
||
/** | ||
* Configuration group for the PubSubDevService. This class holds all the configuration properties | ||
* related to the Google Cloud Pub/Sub service for development environments. | ||
* <p> | ||
* Here is an example of how to configure these properties: | ||
* <p> | ||
* | ||
* <pre> | ||
* quarkus.pub-sub-dev-service.enabled = true | ||
* quarkus.pub-sub-dev-service.image-name = gcr.io/google.com/cloudsdktool/google-cloud-cli # optional | ||
* quarkus.pub-sub-dev-service.emulatorPort = 8085 # optional | ||
* </pre> | ||
*/ | ||
@ConfigGroup | ||
public class PubSubDevServiceConfig { | ||
|
||
/** | ||
* Indicates whether the Pub/Sub service should be enabled or not. | ||
* The default value is 'false'. | ||
*/ | ||
@ConfigItem(defaultValue = "false") | ||
public boolean enabled; | ||
|
||
/** | ||
* Sets the Docker image name for the Google Cloud SDK. | ||
* This image is used to emulate the Pub/Sub service in the development environment. | ||
* The default value is 'gcr.io/google.com/cloudsdktool/google-cloud-cli'. | ||
*/ | ||
@ConfigItem(name = "image-name", defaultValue = "gcr.io/google.com/cloudsdktool/google-cloud-cli") | ||
public String imageName; | ||
|
||
/** | ||
* Specifies the emulatorPort on which the Pub/Sub service should run in the development environment. | ||
*/ | ||
@ConfigItem(name = "emulatorPort") | ||
public Optional<Integer> port = Optional.empty(); | ||
} |
Oops, something went wrong.