-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Support YAML configuration for Launcher #211
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a4178c0
feat: Support YAML configuration for Launcher
pabloecol 19ca38e
review feedback
pabloecol 8b3fe84
fix docs
pabloecol 5ef97a3
use constant
pabloecol 1e8cda7
move parsing logic outside Launcher
pabloecol 0b64169
Merge branch 'main' into launcher-configs
pabloecol 1560032
add shutdown method
pabloecol 89770a8
fix exception handling
pabloecol 9e62beb
add test to verify config file precedence
pabloecol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 @@ | ||
| # Global client configuration | ||
| globalClientConfigs: | ||
| enableBuiltInMetrics: true | ||
| healthCheckEndpoint: "127.0.0.1:8080" | ||
|
|
||
| # List of all listeners | ||
| listeners: | ||
| - # Configuration for listener_1 | ||
| name: "listener_1" | ||
| host: "127.0.0.1" | ||
| port: 9042 | ||
| spanner: | ||
| databaseUri: "projects/span-cloud-testing/instances/pecheverri-cassandra/databases/default" | ||
| numGrpcChannels: 4 | ||
| maxCommitDelayMillis: 5 | ||
| - # Configuration for listener_2 | ||
| name: "listener_2" | ||
| host: "127.0.0.2" | ||
| port: 9043 | ||
| spanner: | ||
| databaseUri: "projects/span-cloud-testing/instances/pecheverri-cassandra/databases/default" | ||
| numGrpcChannels: 8 |
This file contains hidden or 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,59 @@ | ||
| # Config Options | ||
|
|
||
| This file documents all the configuration options supported by the Spanner Cassandra Adapter. | ||
|
|
||
| ```yaml | ||
| # [Optional] Global client configurations that apply to all listeners. | ||
| globalClientConfigs: | ||
| # [Optional] Enables built-in metrics. Defaults to false. It is highly recommended to enable metrics in production environments for improved debuggability. | ||
| enableBuiltInMetrics: true | ||
| # [Optional] The endpoint for the health check server. If not specified, the health check server will not be started. | ||
| # To check the status, send a GET request to the '/debug/health' path on this endpoint. | ||
| # - A '200 OK' status indicates that the service is healthy. | ||
| # - A '503 Service Unavailable' status indicates that one or more listeners failed to start. | ||
| healthCheckEndpoint: "127.0.0.1:8080" | ||
|
|
||
| # A list of all listeners to start. | ||
| listeners: | ||
| # The name of the listener. It is recommended to use a meaningful name, such as the cluster name. | ||
| - name: "listener_1" | ||
| # [Optional] The host to bind the listener to. Defaults to "0.0.0.0". | ||
| host: "127.0.0.1" | ||
| # [Optional] The port to bind the listener to. Defaults to 9042. | ||
| port: 9042 | ||
| # Spanner configuration for this listener. | ||
| spanner: | ||
| # The URI of the Spanner database. | ||
| databaseUri: "projects/my-project/instances/my-instance/databases/my-database" | ||
| # [Optional] The number of gRPC channels to use. Defaults to 4. | ||
| numGrpcChannels: 4 | ||
| # [Optional] The maximum commit delay in milliseconds. Defaults to 0ms. | ||
| # This is the amount of latency this request is willing to incur in order | ||
| # to improve throughput. If this field is not set, Spanner assumes requests | ||
| # are relatively latency sensitive and automatically determines an appropriate | ||
| # delay time. | ||
| maxCommitDelayMillis: 5 | ||
| ``` | ||
|
|
||
| # Example config.yaml | ||
|
|
||
| ```yaml | ||
| globalClientConfigs: | ||
| enableBuiltInMetrics: true | ||
| healthCheckEndpoint: "127.0.0.1:8080" | ||
|
|
||
| listeners: | ||
| - name: "listener_1" | ||
| host: "127.0.0.1" | ||
| port: 9042 | ||
| spanner: | ||
| databaseUri: "projects/my-project/instances/my-instance/databases/my-database" | ||
| numGrpcChannels: 4 | ||
| maxCommitDelayMillis: 5 | ||
| - name: "listener_2" | ||
| host: "127.0.0.2" | ||
| port: 9043 | ||
| spanner: | ||
| databaseUri: "projects/my-project/instances/my-instance/databases/my-database-2" | ||
| numGrpcChannels: 8 | ||
| ``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.