Add comments to MockCheckpoint functions and gofmt

This commit is contained in:
Klaudiusz Dembler 2018-02-09 10:35:54 +01:00 committed by Klaudiusz Dembler
parent 0fbd19bc06
commit cc3fa67bda
No known key found for this signature in database
GPG Key ID: 14B9FB649EE34C35
2 changed files with 7 additions and 4 deletions

View File

@ -25,14 +25,14 @@ import (
hashutil "k8s.io/kubernetes/pkg/util/hash"
)
var _ checkpointmanager.Checkpoint = &cpuManagerCheckpoint {}
var _ checkpointmanager.Checkpoint = &cpuManagerCheckpoint{}
// cpuManagerCheckpoint struct is used to store cpu/pod assignments in a checkpoint
type cpuManagerCheckpoint struct {
PolicyName string
PolicyName string
DefaultCPUSet string
Entries map[string]string
Checksum uint64
Entries map[string]string
Checksum uint64
}
// NewCPUManagerCheckpoint returns an instance of Checkpoint

View File

@ -30,12 +30,15 @@ func (mc *MockCheckpoint) MarshalCheckpoint() ([]byte, error) {
return []byte(mc.Content), nil
}
// UnmarshalCheckpoint fakes unmarshaling
func (mc *MockCheckpoint) UnmarshalCheckpoint(blob []byte) error {
return nil
}
// GetChecksum fakes getting checksum
func (mc *MockCheckpoint) GetChecksum() uint64 {
return 0
}
// UpdateChecksum fakes updating cheksum
func (mc *MockCheckpoint) UpdateChecksum() {}