Commit 2966bb2b authored by Dustin L. Howett's avatar Dustin L. Howett

[expirator] Run the expirator automatically when it's created. Make Run private.

parent 5f9867f7
......@@ -34,11 +34,13 @@ type ExpirableStore interface {
func NewExpirator(path string, store ExpirableStore) *Expirator {
return &Expirator{
e := &Expirator{
store: store,
dataPath: path,
expirationChannel: make(chan *expirationHandle, 1000),
return e
func (e *Expirator) canSave() bool {
......@@ -123,7 +125,7 @@ func (e *Expirator) cancelExpirationHandle(ex *expirationHandle) {
glog.Info("Execution order for ", ex.ID, " belayed.")
func (e *Expirator) Run() {
func (e *Expirator) run() {
go e.loadExpirations()
glog.Info("Launching Expirator.")
var flushTickerChan, urgentFlushTickerChan <-chan time.Time
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