Skip to content

Commit 1c2392c

Browse files
committed
[config] fix lint issues
1 parent dd88eea commit 1c2392c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

internal/config/config.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ type Cache struct {
8282
}
8383

8484
type PubSub struct {
85-
URL string `yaml:"url" envconfig:"PUBSUB__URL"`
85+
URL string `yaml:"url" envconfig:"PUBSUB__URL"`
86+
BufferSize uint `yaml:"buffer_size" envconfig:"PUBSUB__BUFFER_SIZE"`
8687
}
8788

8889
func Default() Config {
@@ -119,7 +120,8 @@ func Default() Config {
119120
URL: "memory://",
120121
},
121122
PubSub: PubSub{
122-
URL: "memory://",
123+
URL: "memory://",
124+
BufferSize: 128,
123125
},
124126
}
125127
}

internal/config/module.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func Module() fx.Option {
115115
) * time.Second,
116116
}
117117
}),
118-
fx.Provide(func(cfg Config) devices.Config {
118+
fx.Provide(func(_ Config) devices.Config {
119119
return devices.Config{
120120
UnusedLifetime: 365 * 24 * time.Hour, //TODO: make it configurable
121121
}
@@ -133,7 +133,7 @@ func Module() fx.Option {
133133
fx.Provide(func(cfg Config) pubsub.Config {
134134
return pubsub.Config{
135135
URL: cfg.PubSub.URL,
136-
BufferSize: 128,
136+
BufferSize: cfg.PubSub.BufferSize,
137137
}
138138
}),
139139
)

0 commit comments

Comments
 (0)