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
05788492
Unverified
Commit
05788492
authored
Feb 07, 2019
by
Raúl Kripalani
Committed by
GitHub
Feb 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #118 from raulk/master
Splinter TTLDatastore interface into TTL + Datastore
parents
cd4c340c
956ee887
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
.gx/lastpubver
.gx/lastpubver
+1
-1
datastore.go
datastore.go
+4
-0
package.json
package.json
+1
-1
No files found.
.gx/lastpubver
View file @
05788492
3.6.
0
: Qm
daa4JxUkSS7yuV4tbfe3jdq32dUFGrHbjqRwkthTcvZy
3.6.
1
: Qm
UadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9
datastore.go
View file @
05788492
...
@@ -159,7 +159,11 @@ func DiskUsage(d Datastore) (uint64, error) {
...
@@ -159,7 +159,11 @@ func DiskUsage(d Datastore) (uint64, error) {
// support expiring entries.
// support expiring entries.
type
TTLDatastore
interface
{
type
TTLDatastore
interface
{
Datastore
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
PutWithTTL
(
key
Key
,
value
[]
byte
,
ttl
time
.
Duration
)
error
SetTTL
(
key
Key
,
ttl
time
.
Duration
)
error
SetTTL
(
key
Key
,
ttl
time
.
Duration
)
error
GetExpiration
(
key
Key
)
(
time
.
Time
,
error
)
GetExpiration
(
key
Key
)
(
time
.
Time
,
error
)
...
...
package.json
View file @
05788492
...
@@ -37,6 +37,6 @@
...
@@ -37,6 +37,6 @@
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
"name"
:
"go-datastore"
,
"name"
:
"go-datastore"
,
"releaseCmd"
:
"git commit -a -m
\"
gx publish $VERSION
\"
"
,
"releaseCmd"
:
"git commit -a -m
\"
gx publish $VERSION
\"
"
,
"version"
:
"3.6.
0
"
"version"
:
"3.6.
1
"
}
}
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