Commit 7e4808bc authored by Dustin L. Howett's avatar Dustin L. Howett

[expirator] Add 'Expirable' to Get/Destroy.

parent a9f645f8
......@@ -30,8 +30,8 @@ type Expirable interface {
}
type ExpirableStore interface {
Get(ExpirableID) (Expirable, error)
Destroy(Expirable)
GetExpirable(ExpirableID) (Expirable, error)
DestroyExpirable(Expirable)
}
func NewExpirator(path string, store ExpirableStore) *Expirator {
......@@ -145,9 +145,9 @@ func (e *Expirator) Run() {
}
case expiration := <-e.expirationChannel:
glog.Info("Expiring ", expiration.ID)
expirable, _ := e.Store.Get(expiration.ID)
expirable, _ := e.Store.GetExpirable(expiration.ID)
if expirable != nil {
e.Store.Destroy(expirable)
e.Store.DestroyExpirable(expirable)
}
delete(e.expirationMap, expiration.ID)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment