driver: allow arbitrary client opts

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-07-04 11:32:26 +02:00
parent b96ad59f64
commit 1dceb49a27
2 changed files with 14 additions and 7 deletions

View File

@ -155,9 +155,9 @@ type DriverHandle struct {
historyAPISupported bool
}
func (d *DriverHandle) Client(ctx context.Context) (*client.Client, error) {
func (d *DriverHandle) Client(ctx context.Context, opt ...client.ClientOpt) (*client.Client, error) {
d.once.Do(func() {
d.client, d.err = d.Driver.Client(ctx, d.getClientOptions()...)
d.client, d.err = d.Driver.Client(ctx, append(d.getClientOptions(), opt...)...)
})
return d.client, d.err
}