cloud functions - local dev launch config

This commit is contained in:
justinschuldt 2022-03-14 13:36:21 -05:00 committed by Justin Schuldt
parent fe12f78cdf
commit 69c41d901e
1 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,56 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "mainnet-data",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"args": [
"-race" // tells Go to report race conditions
],
"env": {
"PORT": "8080",
"GCP_PROJECT": "wormhole-315720",
"BIGTABLE_INSTANCE": "wormhole-mainnet",
"CACHE_BUCKET": "cloud-function-cache-mainnet",
"GOOGLE_APPLICATION_CREDENTIALS": "/home/you/path/to/your/service-account.json",
// CoinGecko API key if you have one. will work without - rate limit is lower.
// "COINGECKO_API_KEY": "your-key-here",
// SolanaBeach API key if you have one. will work without - rate limit is lower.
// "SOLANABEACH_API_KEY": "your-key-here",
// if you'd like run local functions triggered by Pub/Sub messages, uncomment the following
// "PUBSUB_NEW_VAA_TOPIC": "new-vaa-devnet-${env:USERNAME}",
// "PUBSUB_NEW_VAA_SUBSCRIPTION": "extract-payload-devnet-${env:USERNAME}",
// "PUBSUB_TOKEN_TRANSFER_DETAILS_TOPIC": "create-token-transfer-details-${env:USERNAME}",
// "PUBSUB_TOKEN_TRANSFER_DETAILS_SUBSCRIPTION": "calculate-transfer-data-devnet-${env:USERNAME}",
},
},
{
"name": "devnet-emulators",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"args": [
"-race"
],
"env": {
// Tilt devnet values, set in devnet/bigtable.yaml
"GCP_PROJECT": "local-dev",
"BIGTABLE_INSTANCE": "wormhole",
"BIGTABLE_EMULATOR_HOST": "localhost:8086",
"PUBSUB_EMULATOR_HOST": "localhost:8085",
"PUBSUB_NEW_VAA_TOPIC": "new-vaa-devnet",
"PUBSUB_NEW_VAA_SUBSCRIPTION": "extract-payload-devnet",
"PUBSUB_TOKEN_TRANSFER_DETAILS_TOPIC": "create-token-transfer-details-devnet",
"PUBSUB_TOKEN_TRANSFER_DETAILS_SUBSCRIPTION": "calculate-transfer-data-devnet",
"CACHE_BUCKET": "cloud-function-cache-devnet",
},
},
]
}