|
|
|
@ -36,6 +36,10 @@ import (
|
|
|
|
|
// ElementType is the type of elements of a Parameter.
|
|
|
|
|
type ElementType int
|
|
|
|
|
|
|
|
|
|
// ErrCheckpointNotFound indicates that the pserver checkpoint could
|
|
|
|
|
// not be found.
|
|
|
|
|
var ErrCheckpointNotFound = errors.New("checkpoint not found")
|
|
|
|
|
|
|
|
|
|
// RPC error message.
|
|
|
|
|
const (
|
|
|
|
|
AlreadyInitialized = "pserver already initialized"
|
|
|
|
@ -103,6 +107,10 @@ func NewCheckpointFromFile(cpPath string, idx int, e *EtcdClient) (Checkpoint, e
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if len(v) == 0 {
|
|
|
|
|
return nil, ErrCheckpointNotFound
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var cpMeta checkpointMeta
|
|
|
|
|
if err = json.Unmarshal(v, &cpMeta); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|