File tree Expand file tree Collapse file tree 14 files changed +60
-83
lines changed Expand file tree Collapse file tree 14 files changed +60
-83
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,6 @@ linters:
240240 - interfacebloat
241241 - ireturn
242242 - maintidx
243- - maligned
244243 - nonamedreturns
245244 - paralleltest
246245 - scopelint
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ import (
5050var _ Connection = (* Driver )(nil )
5151
5252// Driver type provide access to YDB service clients
53- type Driver struct { //nolint:maligned
53+ type Driver struct {
5454 ctx context.Context // cancel while Driver.Close called.
5555 ctxCancel context.CancelFunc
5656
Original file line number Diff line number Diff line change @@ -19,19 +19,15 @@ var (
1919
2020// A Worker must not be copied after first use
2121type Worker struct {
22- ctx context.Context
23- workers sync.WaitGroup
24- onceInit sync.Once
25-
22+ ctx context.Context
23+ workers sync.WaitGroup
24+ closeReason error
2625 tasksCompleted empty.Chan
27-
28- m xsync.Mutex
29-
30- tasks chan backgroundTask
31-
32- closed bool
33- stop context.CancelFunc
34- closeReason error
26+ tasks chan backgroundTask
27+ stop context.CancelFunc
28+ onceInit sync.Once
29+ m xsync.Mutex
30+ closed bool
3531}
3632
3733type CallbackFunc func (ctx context.Context )
Original file line number Diff line number Diff line change 66)
77
88// Config is an configuration of coordination client
9- //
10- //nolint:maligned
119type Config struct {
1210 config.Common
1311
Original file line number Diff line number Diff line change @@ -90,11 +90,11 @@ type UpdateTokenRequest struct {
9090}
9191
9292type UpdateTokenResponse struct {
93+ rawtopiccommon.UpdateTokenResponse
94+
9395 serverMessageImpl
9496
9597 rawtopiccommon.ServerMessageMetadata
96-
97- rawtopiccommon.UpdateTokenResponse
9898}
9999
100100//
Original file line number Diff line number Diff line change @@ -303,9 +303,9 @@ type UpdateTokenRequest struct {
303303}
304304
305305type UpdateTokenResponse struct {
306+ rawtopiccommon.UpdateTokenResponse
307+
306308 serverMessageImpl
307309
308310 rawtopiccommon.ServerMessageMetadata
309-
310- rawtopiccommon.UpdateTokenResponse
311311}
Original file line number Diff line number Diff line change 66)
77
88// Config is a configuration of ratelimiter client
9- //
10- //nolint:maligned
119type Config struct {
1210 config.Common
1311
Original file line number Diff line number Diff line change 66)
77
88// Config is a configuration of scheme client
9- //
10- //nolint:maligned
119type Config struct {
1210 config.Common
1311
Original file line number Diff line number Diff line change @@ -45,17 +45,15 @@ import (
4545// Note that after session is no longer needed it should be destroyed by
4646// Close() call.
4747type session struct {
48+ onClose []func (s * session )
4849 id string
4950 tableService Ydb_Table_V1.TableServiceClient
51+ status table.SessionStatus
5052 config * config.Config
51-
52- status table.SessionStatus
53- statusMtx sync.RWMutex
54- nodeID atomic.Uint32
55- lastUsage atomic.Int64
56-
57- onClose []func (s * session )
58- closeOnce sync.Once
53+ lastUsage atomic.Int64
54+ statusMtx sync.RWMutex
55+ closeOnce sync.Once
56+ nodeID atomic.Uint32
5957}
6058
6159func (s * session ) LastUsage () time.Time {
Original file line number Diff line number Diff line change @@ -29,30 +29,24 @@ var (
2929type readerConnectFunc func (ctx context.Context ) (batchedStreamReader , error )
3030
3131type readerReconnector struct {
32- clock clockwork.Clock
33- background background.Worker
34-
35- tracer * trace.Topic
36- baseContext context.Context
37- retrySettings topic.RetrySettings
38-
39- readerConnect readerConnectFunc
40-
41- reconnectFromBadStream chan reconnectRequest
42- connectTimeout time.Duration
43-
44- closeOnce sync.Once
45- readerID int64
46-
47- m xsync.RWMutex
48- streamConnectionInProgress empty.Chan // opened if connection in progress, closed if connection established
32+ background background.Worker
33+ clock clockwork.Clock
34+ baseContext context.Context
35+ retrySettings topic.RetrySettings
4936 streamVal batchedStreamReader
5037 streamErr error
5138 closedErr error
52-
53- initErr error
54- initDone bool
55- initDoneCh empty.Chan
39+ initErr error
40+ tracer * trace.Topic
41+ readerConnect readerConnectFunc
42+ reconnectFromBadStream chan reconnectRequest
43+ connectTimeout time.Duration
44+ readerID int64
45+ streamConnectionInProgress empty.Chan // opened if connection in progress, closed if connection established
46+ initDoneCh empty.Chan
47+ m xsync.RWMutex
48+ closeOnce sync.Once
49+ initDone bool
5650}
5751
5852//nolint:revive
You can’t perform that action at this time.
0 commit comments