File tree Expand file tree Collapse file tree 9 files changed +36
-69
lines changed
pkg/systemlogmonitor/logwatchers/filelog Expand file tree Collapse file tree 9 files changed +36
-69
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ require (
12
12
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
13
13
github.com/euank/go-kmsg-parser v2.0.0+incompatible
14
14
github.com/golang/glog v1.1.1
15
- github.com/google/cadvisor v0.36.0
16
15
github.com/hpcloud/tail v1.0.0
17
16
github.com/onsi/ginkgo v1.16.5
18
17
github.com/onsi/gomega v1.27.8
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import (
21
21
"io"
22
22
"os"
23
23
24
- "github.com/google/cadvisor/utils /tail"
24
+ "k8s.io/node-problem-detector/third_party/cadvisor /tail"
25
25
)
26
26
27
27
// getLogReader returns log reader for filelog log. Note that getLogReader doesn't look back
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ Forked from https://github.com/google/cadvisor/blob/8016f8ba96e74fb2001b121e0145dc2d0fe056e3/utils/tail/tail.go to support simple file tailing.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 Google Inc. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ package tail
16
+
17
+ import (
18
+ "io"
19
+ "testing"
20
+
21
+ "github.com/stretchr/testify/assert"
22
+ )
23
+
24
+ func TestReadNewTail (t * testing.T ) {
25
+ // Read should return (0, io.EOF) before first
26
+ // attemptOpen.
27
+ tail , err := newTail ("test/nonexist/file" )
28
+ assert .NoError (t , err )
29
+ buf := make ([]byte , 0 , 100 )
30
+ n , err := tail .Read (buf )
31
+ assert .Equal (t , n , 0 )
32
+ assert .Equal (t , len (buf ), 0 )
33
+ assert .EqualError (t , err , io .EOF .Error ())
34
+ }
Original file line number Diff line number Diff line change @@ -147,9 +147,6 @@ github.com/golang/protobuf/ptypes/any
147
147
github.com/golang/protobuf/ptypes/duration
148
148
github.com/golang/protobuf/ptypes/timestamp
149
149
github.com/golang/protobuf/ptypes/wrappers
150
- # github.com/google/cadvisor v0.36.0
151
- ## explicit; go 1.13
152
- github.com/google/cadvisor/utils/tail
153
150
# github.com/google/gnostic-models v0.6.8
154
151
## explicit; go 1.18
155
152
github.com/google/gnostic-models/compiler
You can’t perform that action at this time.
0 commit comments