add parameters names in order to serve as suggestions and ignore explicitly bellow to avoid lint msgs.

This commit is contained in:
Fabiano Graças 2021-11-08 16:28:32 +01:00 committed by Tao Jiang
parent 97c6633ea0
commit a44513ef08

View file

@ -32,29 +32,29 @@ package metrics
type MonitoringService interface { type MonitoringService interface {
Init(appName, streamName, workerID string) error Init(appName, streamName, workerID string) error
Start() error Start() error
IncrRecordsProcessed(string, int) IncrRecordsProcessed(shard string, count int)
IncrBytesProcessed(string, int64) IncrBytesProcessed(shard string, count int64)
MillisBehindLatest(string, float64) MillisBehindLatest(shard string, milliSeconds float64)
LeaseGained(string) LeaseGained(shard string)
LeaseLost(string) LeaseLost(shard string)
LeaseRenewed(string) LeaseRenewed(shard string)
RecordGetRecordsTime(string, float64) RecordGetRecordsTime(shard string, time float64)
RecordProcessRecordsTime(string, float64) RecordProcessRecordsTime(shard string, time float64)
Shutdown() Shutdown()
} }
// NoopMonitoringService implements MonitoringService by does nothing. // NoopMonitoringService implements MonitoringService by does nothing.
type NoopMonitoringService struct{} type NoopMonitoringService struct{}
func (NoopMonitoringService) Init(appName, streamName, workerID string) error { return nil } func (NoopMonitoringService) Init(_, _, _ string) error { return nil }
func (NoopMonitoringService) Start() error { return nil } func (NoopMonitoringService) Start() error { return nil }
func (NoopMonitoringService) Shutdown() {} func (NoopMonitoringService) Shutdown() {}
func (NoopMonitoringService) IncrRecordsProcessed(shard string, count int) {} func (NoopMonitoringService) IncrRecordsProcessed(_ string, _ int) {}
func (NoopMonitoringService) IncrBytesProcessed(shard string, count int64) {} func (NoopMonitoringService) IncrBytesProcessed(_ string, _ int64) {}
func (NoopMonitoringService) MillisBehindLatest(shard string, millSeconds float64) {} func (NoopMonitoringService) MillisBehindLatest(_ string, _ float64) {}
func (NoopMonitoringService) LeaseGained(shard string) {} func (NoopMonitoringService) LeaseGained(_ string) {}
func (NoopMonitoringService) LeaseLost(shard string) {} func (NoopMonitoringService) LeaseLost(_ string) {}
func (NoopMonitoringService) LeaseRenewed(shard string) {} func (NoopMonitoringService) LeaseRenewed(_ string) {}
func (NoopMonitoringService) RecordGetRecordsTime(shard string, time float64) {} func (NoopMonitoringService) RecordGetRecordsTime(_ string, _ float64) {}
func (NoopMonitoringService) RecordProcessRecordsTime(shard string, time float64) {} func (NoopMonitoringService) RecordProcessRecordsTime(_ string, _ float64) {}