Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splinter TTLDatastore interface into TTL + Datastore #118

Merged
merged 2 commits into from
Feb 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gx/lastpubver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.0: Qmdaa4JxUkSS7yuV4tbfe3jdq32dUFGrHbjqRwkthTcvZy
3.6.1: QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9
4 changes: 4 additions & 0 deletions datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ func DiskUsage(d Datastore) (uint64, error) {
// support expiring entries.
type TTLDatastore interface {
Datastore
TTL
}

// TTL encapulates the methods that deal with entries with time-to-live.
type TTL interface {
PutWithTTL(key Key, value []byte, ttl time.Duration) error
SetTTL(key Key, ttl time.Duration) error
GetExpiration(key Key) (time.Time, error)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"license": "MIT",
"name": "go-datastore",
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
"version": "3.6.0"
"version": "3.6.1"
}