wormhole/event_database/cloud_functions
Leo b0ed42681d Use stable Buildkit syntax
We no longer need to be on an experimental branch - all the
Dockerfile features we need were released on 1.3.

commit-id:b083856a
2021-12-13 15:38:17 +01:00
..
.vscode debug cloud functions locally 2021-10-29 15:13:50 +00:00
cmd debug cloud functions locally 2021-10-29 15:13:50 +00:00
Dockerfile.run Use stable Buildkit syntax 2021-12-13 15:38:17 +01:00
README.md BigTable historical queries 2021-10-13 16:20:10 +00:00
bigtable-endpoints.md BigTable historical queries 2021-10-13 16:20:10 +00:00
go.mod cloud functions: use rowkey data in Summary 2021-11-09 19:14:02 +00:00
go.sum cloud functions: use rowkey data in Summary 2021-11-09 19:14:02 +00:00
readrow.go remove SignedVAA from /recent response 2021-11-09 19:13:10 +00:00
recent.go remove SignedVAA from /recent response 2021-11-09 19:13:10 +00:00
shared.go cloud functions: use rowkey data in Summary 2021-11-09 19:14:02 +00:00
totals.go async queries for /totals function 2021-10-29 20:56:13 +00:00
transaction.go remove SignedVAA from /recent response 2021-11-09 19:13:10 +00:00

README.md

Google Cloud function for reading BigTable

This is a reference implementaion for getting data out of BigTable.

deploying

First deploy (creation) must include all the flags to configure the environment:

gcloud functions --project your-project deploy testnet --region europe-west3 --entry-point Entry --runtime go116 --trigger-http --allow-unauthenticated --service-account=your-readonly@your-project.iam.gserviceaccount.com --update-env-vars GCP_PROJECT=your-project,BIGTABLE_INSTANCE=wormhole-testnet

Subsequent deploys (updates) only need include flags to indentify the resource for updating: project, region, name.

gcloud functions --project your-project deploy testnet --region europe-west3 --entry-point Entry

invocation

All routes accept their input(s) as query parameters, or request body. Just two different ways of querying:

GET

curl "https://region-project-id.cloudfunctions.net/testnet/readrow?emitterChain=2&emitterAddress=000000000000000000000000e982e462b094850f12af94d21d470e21be9d0e9c&sequence=0000000000000006"

POST

curl -X POST  https://region-project-id.cloudfunctions.net/testnet/readrow \
-H "Content-Type:application/json" \
-d \
'{"emitterChain":"2", "emitterAddress":"000000000000000000000000e982e462b094850f12af94d21d470e21be9d0e9c", "sequence":"0000000000000006"}'

See ./bigtable-endpoints.md for API patterns