[#1869] shard: Embed gcCfg as raw struct

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-10-16 15:07:38 +03:00 committed by fyrchik
parent 60e9de8d63
commit f769fc83fc
3 changed files with 4 additions and 4 deletions

View file

@ -135,7 +135,7 @@ func (s *Shard) Init() error {
s.updateObjectCounter()
s.gc = &gc{
gcCfg: s.gcCfg,
gcCfg: &s.gcCfg,
remover: s.removeGarbage,
stopChannel: make(chan struct{}),
eventChan: make(chan Event),

View file

@ -82,8 +82,8 @@ type gcCfg struct {
workerPoolInit func(int) util.WorkerPool
}
func defaultGCCfg() *gcCfg {
return &gcCfg{
func defaultGCCfg() gcCfg {
return gcCfg{
removerInterval: 10 * time.Second,
log: &logger.Logger{Logger: zap.L()},
workerPoolInit: func(int) util.WorkerPool {

View file

@ -85,7 +85,7 @@ type cfg struct {
log *logger.Logger
gcCfg *gcCfg
gcCfg gcCfg
expiredTombstonesCallback ExpiredTombstonesCallback