type Checkpointer … type checkpointer … // NewCheckpointer creates new checkpointer for keeping track of claim info with checkpoint backend func NewCheckpointer(stateDir, checkpointName string) (Checkpointer, error) { … } // GetOrCreate gets list of claim info states from a checkpoint // or creates empty list if checkpoint doesn't exist func (sc *checkpointer) GetOrCreate() (*Checkpoint, error) { … } // Store stores checkpoint to the file func (sc *checkpointer) Store(checkpoint *Checkpoint) error { … } // store saves state to a checkpoint, caller is responsible for locking func (sc *checkpointer) store(checkpoint *Checkpoint) error { … }