File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
1111
1212 "github.com/ydb-platform/ydb-go-sdk/v3/config"
1313 "github.com/ydb-platform/ydb-go-sdk/v3/credentials"
14- "github.com/ydb-platform/ydb-go-sdk/v3/internal/balancer"
1514 balancerConfig "github.com/ydb-platform/ydb-go-sdk/v3/internal/balancer/config"
1615 "github.com/ydb-platform/ydb-go-sdk/v3/internal/certificates"
1716 "github.com/ydb-platform/ydb-go-sdk/v3/internal/conn"
@@ -600,6 +599,15 @@ func WithPanicCallback(panicCallback func(e interface{})) Option {
600599 }
601600}
602601
602+ // WithSharedBalancer sets balancer from parent driver to child driver
603+ func WithSharedBalancer (parent * Driver ) Option {
604+ return func (ctx context.Context , c * Driver ) error {
605+ c .balancer = parent .balancer
606+
607+ return nil
608+ }
609+ }
610+
603611// WithTraceTable appends trace.Table into table traces
604612func WithTraceTable (t trace.Table , opts ... trace.TableComposeOption ) Option { //nolint:gocritic
605613 return func (ctx context.Context , c * Driver ) error {
@@ -805,11 +813,3 @@ func withConnPool(pool *conn.Pool) Option {
805813 return pool .Take (ctx )
806814 }
807815}
808-
809- func WithSharedBalancer (parent * Driver ) Option {
810- return func (ctx context.Context , c * Driver ) error {
811- c .balancer = parent .balancer
812-
813- return nil
814- }
815- }
You can’t perform that action at this time.
0 commit comments