Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik committed Nov 6, 2024
1 parent 36a1060 commit 372da31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions pkg/networkservice/chains/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func NewClient(ctx context.Context, clientOpts ...Option) networkservice.Network
authorizeClient: null.NewClient(),
healClient: null.NewClient(),
refreshClient: refresh.NewClient(ctx),
reselectFunc: begin.DefaultReselectFunc,
}
for _, opt := range clientOpts {
opt(opts)
Expand Down
13 changes: 2 additions & 11 deletions pkg/networkservice/common/begin/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ package begin

import (
"context"
"time"
)

type option struct {
cancelCtx context.Context
reselect bool
contextTimeout time.Duration
cancelCtx context.Context
reselect bool
}

type clientOption struct {
Expand All @@ -51,13 +49,6 @@ func WithReselect() Option {
}
}

// WithContextTimeout - set a custom timeout for a context in begin.Close
func WithContextTimeout(timeout time.Duration) Option {
return func(o *option) {
o.contextTimeout = timeout
}
}

// WithReselectFunc - sets a function for changing request parameters on reselect
func WithReselectFunc(reselectFunc ReselectFunc) ClientOption {
return func(o *clientOption) {
Expand Down

0 comments on commit 372da31

Please sign in to comment.