Open Michaelhobo opened 3 years ago
Or, is there a way to pull in just the spanner emulator piece of gcloud? The full unpacked google-cloud-sdk distribution is 421MB on disk!
Ah never mind, I found the InstanceAdmin Go API here: https://godoc.org/cloud.google.com/go/spanner/admin/instance/apiv1
Can we add this to the docs somewhere? I started here: https://cloud.google.com/spanner/docs/emulator, then follow "Getting Started in Go", where it tells you how to create a database in Go, but not how to create an instance in Go.
I think https://cloud.google.com/spanner/docs/getting-started/go#create_an_instance should have a snippet for how to create an instance in Go.
@arunmoezhi I think we should close this
We have passed it to documentation team, it will be done for all the client libraries to make it consistent so it's a time consuming task and low priority for now as documentation is already available.
I'm trying to write a unit test for a Go package using Spanner. If possible, I don't want to include gcloud, because I'd need to pull a static version of gcloud into my Bazel workspace. I pulled in the spanner emulator binary into my workspace, and I'm executing
path/to/emulator_main --host_port localhost:12345
from my test. I now need to create an instance - is there a Go api I can use to create an instance? Or, how would you recommend going about this?