Skip to content

Commit

Permalink
Add basepath generation (#4745) (#700)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored May 6, 2021
1 parent da4fe39 commit 511b88e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ type Config struct {
requestBatcherIam *RequestBatcher

// start DCL clients
// dataprocBasePath is implemented in mm
clientDataprocDCL *dataprocDcl.Client
EventarcBasePath string
clientEventarcDCL *eventarcDcl.Client
}

Expand Down Expand Up @@ -290,8 +292,8 @@ func (c *Config) LoadAndValidate(ctx context.Context) error {
dclLoggerOptions := dcl.WithLogger(dclLogger{})
// each product needs it own client currently since basepath can only be specified at
// the config level.
c.clientDataprocDCL = dataprocDcl.NewClient(dcl.NewConfig(dclClientOptions, dclUserAgentOptions, dclLoggerOptions))
c.clientEventarcDCL = eventarcDcl.NewClient(dcl.NewConfig(dclClientOptions, dclUserAgentOptions, dclLoggerOptions))
c.clientDataprocDCL = dataprocDcl.NewClient(dcl.NewConfig(dclClientOptions, dclUserAgentOptions, dclLoggerOptions, dcl.WithBasePath(c.DataprocBasePath)))
c.clientEventarcDCL = eventarcDcl.NewClient(dcl.NewConfig(dclClientOptions, dclUserAgentOptions, dclLoggerOptions, dcl.WithBasePath(c.EventarcBasePath)))

return nil
}
Expand Down

0 comments on commit 511b88e

Please sign in to comment.