frostfs-node/pkg/innerring/processors/settlement/opts.go
Leonard Lyubich 4204a9f920 [#326] ir: Implement settlement processor
Define a processor of events related to monetary transactions. Define
audit-related event. Provide an interface for processing the audit payout
event.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-29 11:04:30 +03:00

31 lines
514 B
Go

package settlement
import (
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
"go.uber.org/zap"
)
// Option is a Processor constructor's option.
type Option func(*options)
type options struct {
poolSize int
log *logger.Logger
}
func defaultOptions() *options {
const poolSize = 10
return &options{
poolSize: poolSize,
log: zap.L(),
}
}
// WithLogger returns option to override the component for logging.
func WithLogger(l *logger.Logger) Option {
return func(o *options) {
o.log = l
}
}