Skip to content

Commit

Permalink
Merge pull request #1946 from lexcao/feat/export-spanner-option
Browse files Browse the repository at this point in the history
Export Spanner credential JSON for datastore
  • Loading branch information
josephschorr authored Jun 17, 2024
2 parents 966767e + 020e0e7 commit e78b5d8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cmd/datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ type Config struct {

// Spanner
SpannerCredentialsFile string `debugmap:"visible"`
SpannerCredentialsJSON []byte `debugmap:"sensitive"`
SpannerEmulatorHost string `debugmap:"visible"`
SpannerMinSessions uint64 `debugmap:"visible"`
SpannerMaxSessions uint64 `debugmap:"visible"`
Expand Down Expand Up @@ -429,6 +430,7 @@ func newSpannerDatastore(ctx context.Context, opts Config) (datastore.Datastore,
spanner.RevisionQuantization(opts.RevisionQuantization),
spanner.MaxRevisionStalenessPercent(opts.MaxRevisionStalenessPercent),
spanner.CredentialsFile(opts.SpannerCredentialsFile),
spanner.CredentialsJSON(opts.SpannerCredentialsJSON),
spanner.WatchBufferLength(opts.WatchBufferLength),
spanner.WatchBufferWriteTimeout(opts.WatchBufferWriteTimeout),
spanner.EmulatorHost(opts.SpannerEmulatorHost),
Expand Down
16 changes: 16 additions & 0 deletions pkg/cmd/datastore/zz_generated.options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e78b5d8

Please sign in to comment.