Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-datastore
Commits
205f9f34
Commit
205f9f34
authored
Oct 13, 2017
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define GC/CheckedDatastore interfaces
parent
e8521f97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
datastore.go
datastore.go
+17
-0
No files found.
datastore.go
View file @
205f9f34
...
...
@@ -81,9 +81,26 @@ var ErrBatchUnsupported = errors.New("this datastore does not support batching")
// implement to leverage type safety checks.
type
ThreadSafeDatastore
interface
{
Datastore
IsThreadSafe
()
}
// CheckedDatastore is an interface that should be implemented by datastores
// which may need checking on-disk data integrity.
type
CheckedDatastore
interface
{
Datastore
Check
()
error
}
// GCDatastore is an interface that should be implemented by datastores which
// don't free disk space by just removing data from them
type
GCDatastore
interface
{
Datastore
CollectGarbage
()
error
}
// Errors
// ErrNotFound is returned by Get, Has, and Delete when a datastore does not
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment