aboutsummaryrefslogtreecommitdiffstats
path: root/repository/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository/repo.go')
-rw-r--r--repository/repo.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/repository/repo.go b/repository/repo.go
index 100feaed..8a66c320 100644
--- a/repository/repo.go
+++ b/repository/repo.go
@@ -83,6 +83,7 @@ type Repo interface {
GetTreeHash(commit git.Hash) (git.Hash, error)
}
+// ClockedRepo is a Repo that also has Lamport clocks
type ClockedRepo interface {
Repo
@@ -92,9 +93,15 @@ type ClockedRepo interface {
// WriteClocks write the clocks values into the repo
WriteClocks() error
+ // CreateTime return the current value of the creation clock
+ CreateTime() lamport.Time
+
// CreateTimeIncrement increment the creation clock and return the new value.
CreateTimeIncrement() (lamport.Time, error)
+ // EditTime return the current value of the edit clock
+ EditTime() lamport.Time
+
// EditTimeIncrement increment the edit clock and return the new value.
EditTimeIncrement() (lamport.Time, error)