store: remove write TTL & expiry options (#1960)

This commit is contained in:
ben-toogood
2020-08-21 09:35:53 +01:00
committed by GitHub
parent f146b52418
commit 1ae825032c
5 changed files with 14 additions and 91 deletions

View File

@@ -2,7 +2,6 @@ package store
import (
"context"
"time"
)
// Options contains configuration for the Store
@@ -108,10 +107,6 @@ func ReadOffset(o uint) ReadOption {
// If Expiry and TTL are set TTL takes precedence
type WriteOptions struct {
Database, Table string
// Expiry is the time the record expires
Expiry time.Time
// TTL is the time until the record expires
TTL time.Duration
}
// WriteOption sets values in WriteOptions
@@ -125,20 +120,6 @@ func WriteTo(database, table string) WriteOption {
}
}
// WriteExpiry is the time the record expires
func WriteExpiry(t time.Time) WriteOption {
return func(w *WriteOptions) {
w.Expiry = t
}
}
// WriteTTL is the time the record expires
func WriteTTL(d time.Duration) WriteOption {
return func(w *WriteOptions) {
w.TTL = d
}
}
// DeleteOptions configures an individual Delete operation
type DeleteOptions struct {
Database, Table string