File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
pkg/kubelet/checkpointmanager/checksum Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,6 @@ pkg/kubelet/apis/config/v1beta1
163
163
pkg/kubelet/apis/deviceplugin/v1beta1
164
164
pkg/kubelet/cadvisor
165
165
pkg/kubelet/cadvisor/testing
166
- pkg/kubelet/checkpointmanager/checksum
167
166
pkg/kubelet/checkpointmanager/testing/example_checkpoint_formats/v1
168
167
pkg/kubelet/client
169
168
pkg/kubelet/cm
Original file line number Diff line number Diff line change @@ -23,17 +23,18 @@ import (
23
23
hashutil "k8s.io/kubernetes/pkg/util/hash"
24
24
)
25
25
26
- // Data to be stored as checkpoint
26
+ // Checksum is the data to be stored as checkpoint
27
27
type Checksum uint64
28
28
29
- // VerifyChecksum verifies that passed checksum is same as calculated checksum
29
+ // Verify verifies that passed checksum is same as calculated checksum
30
30
func (cs Checksum ) Verify (data interface {}) error {
31
31
if cs != New (data ) {
32
32
return errors .ErrCorruptCheckpoint
33
33
}
34
34
return nil
35
35
}
36
36
37
+ // New returns the Checksum of checkpoint data
37
38
func New (data interface {}) Checksum {
38
39
return Checksum (getChecksum (data ))
39
40
}
You can’t perform that action at this time.
0 commit comments