Skip to content

Commit da422bb

Browse files
committed
chore: pkg imported more than once
1 parent 339e243 commit da422bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: pkg/systemlogmonitor/log_monitor.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"k8s.io/node-problem-detector/pkg/problemmetrics"
2828
"k8s.io/node-problem-detector/pkg/systemlogmonitor/logwatchers"
2929
watchertypes "k8s.io/node-problem-detector/pkg/systemlogmonitor/logwatchers/types"
30-
logtypes "k8s.io/node-problem-detector/pkg/systemlogmonitor/types"
3130
systemlogtypes "k8s.io/node-problem-detector/pkg/systemlogmonitor/types"
3231
"k8s.io/node-problem-detector/pkg/types"
3332
"k8s.io/node-problem-detector/pkg/util"
@@ -50,7 +49,7 @@ type logMonitor struct {
5049
buffer LogBuffer
5150
config MonitorConfig
5251
conditions []types.Condition
53-
logCh <-chan *logtypes.Log
52+
logCh <-chan *systemlogtypes.Log
5453
output chan *types.Status
5554
tomb *tomb.Tomb
5655
}
@@ -147,7 +146,7 @@ func (l *logMonitor) monitorLoop() {
147146
}
148147

149148
// parseLog parses one log line.
150-
func (l *logMonitor) parseLog(log *logtypes.Log) {
149+
func (l *logMonitor) parseLog(log *systemlogtypes.Log) {
151150
// Once there is new log, log monitor will push it into the log buffer and try
152151
// to match each rule. If any rule is matched, log monitor will report a status.
153152
l.buffer.Push(log)
@@ -163,7 +162,7 @@ func (l *logMonitor) parseLog(log *logtypes.Log) {
163162
}
164163

165164
// generateStatus generates status from the logs.
166-
func (l *logMonitor) generateStatus(logs []*logtypes.Log, rule systemlogtypes.Rule) *types.Status {
165+
func (l *logMonitor) generateStatus(logs []*systemlogtypes.Log, rule systemlogtypes.Rule) *types.Status {
167166
// We use the timestamp of the first log line as the timestamp of the status.
168167
timestamp := logs[0].Timestamp
169168
message := generateMessage(logs)
@@ -251,7 +250,7 @@ func initialConditions(defaults []types.Condition) []types.Condition {
251250
return conditions
252251
}
253252

254-
func generateMessage(logs []*logtypes.Log) string {
253+
func generateMessage(logs []*systemlogtypes.Log) string {
255254
messages := []string{}
256255
for _, log := range logs {
257256
messages = append(messages, log.Message)

0 commit comments

Comments
 (0)