Skip to content

Commit

Permalink
[qfix] Change statsOpts to metricsOpts (#795)
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik authored Aug 6, 2024
1 parent 9d48d2c commit f92725a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkg/networkservice/chains/forwarder/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type forwarderOptions struct {
dialTimeout time.Duration
domain2Device map[string]string
mechanismPrioriyList []string
statsOpts []metrics.Option
metricsOpts []metrics.Option
cleanupOpts []cleanup.Option
vxlanOpts []vxlan.Option
dialOpts []grpc.DialOption
Expand Down Expand Up @@ -105,10 +105,10 @@ func WithMechanismPriority(priorityList []string) Option {
}
}

// WithStatsOptions sets metrics options
func WithStatsOptions(opts ...metrics.Option) Option {
// WithMetricsOptions sets metrics options
func WithMetricsOptions(opts ...metrics.Option) Option {
return func(o *forwarderOptions) {
o.statsOpts = opts
o.metricsOpts = opts
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/networkservice/chains/forwarder/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func NewServer(ctx context.Context, tokenGenerator token.GeneratorFunc, vppConn
sendfd.NewServer(),
discover.NewServer(nsClient, nseClient),
roundrobin.NewServer(),
metrics.NewServer(ctx, vppConn, opts.statsOpts...),
metrics.NewServer(ctx, vppConn, opts.metricsOpts...),
up.NewServer(ctx, vppConn),
xconnect.NewServer(vppConn),
l2bridgedomain.NewServer(vppConn),
Expand Down Expand Up @@ -149,7 +149,7 @@ func NewServer(ctx context.Context, tokenGenerator token.GeneratorFunc, vppConn
cleanup.NewClient(ctx, opts.cleanupOpts...),
mechanismtranslation.NewClient(),
connectioncontextkernel.NewClient(),
metrics.NewClient(ctx, vppConn, opts.statsOpts...),
metrics.NewClient(ctx, vppConn, opts.metricsOpts...),
up.NewClient(ctx, vppConn),
mtu.NewClient(vppConn),
tag.NewClient(ctx, vppConn),
Expand Down

0 comments on commit f92725a

Please sign in to comment.