Skip to content

Commit

Permalink
feat: expose the WithQuotaProject dialer option (#237)
Browse files Browse the repository at this point in the history
feat: expose the WithQuotaProject dialer option

This option is available as google.golang.org/api/option to the
gcloud go API. It needs to be exposed in the cloud sql connector
also.

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
  • Loading branch information
hessjcg and kurtisvg committed Jul 1, 2022
1 parent 5d09352 commit bda8917
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ func WithAdminAPIEndpoint(url string) Option {
}
}

// WithQuotaProject returns an Option that specifies the project used for quota and billing purposes.
func WithQuotaProject(p string) Option {
return func(cfg *dialerConfig) {
cfg.sqladminOpts = append(cfg.sqladminOpts, apiopt.WithQuotaProject(p))
}
}

// WithDialFunc configures the function used to connect to the address on the
// named network. This option is generally unnecessary except for advanced
// use-cases.
Expand Down

0 comments on commit bda8917

Please sign in to comment.