Documentation
¶
Overview ¶
Package checkpoint conserve le contenu des fichiers avant que l'agent les écrase, pour /rewind. Le stockage est adressé par le contenu : un fichier <2 premiers hex>/<sha256 hex>, écrit une seule fois.
Index ¶
Constants ¶
View Source
const ( ActionRestore = "restore" ActionDelete = "delete" StatusOK = "ok" StatusConflict = "conflict" StatusUnrestorable = "unrestorable" StatusNoop = "noop" )
Actions et états d'un fichier du plan.
View Source
const MaxBytes = 10 << 20
MaxBytes : taille maximale d'une copie (10 Mio).
View Source
const Unreadable = "unreadable"
Unreadable : empreinte d'un chemin illisible ou non ordinaire, qui ne correspond à aucune empreinte réelle (conflit assuré).
Variables ¶
View Source
var ( ErrCorrupted = errors.New("corrupted checkpoint") ErrMissing = errors.New("missing checkpoint") )
View Source
var ErrUnknownPoint = errors.New("unknown checkpoint")
ErrUnknownPoint : aucun point de contrôle pour ce seq.
Functions ¶
Types ¶
type FilePlan ¶
type FilePlan struct {
Path string
Action string
Status string
Target string
Expected string
// Current : état observé au calcul du plan (FileState.Key) ; Rewind
// refuse d'agir si le fichier a changé depuis l'aperçu.
Current string
}
FilePlan : ce que /rewind ferait pour un fichier.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store est un magasin de copies adressées par le contenu.
Click to show internal directories.
Click to hide internal directories.