//Init an allocated NotifyStorage func (ns *NotifyStorage) Init(daemon_freq int64) { logger.Println("init notify storage") ns.MapStorage.Init() ns.bg = make(chan expiry.Entry, 100) ns.heap = expiry.NewHeap(100) go ns.ExpiringDaemon(daemon_freq) }
//Init an allocated HeapExpiringStorage func (hs *HeapExpiringStorage) Init(collect_frequency int64) { logger.Println("init heap notify storage") hs.heap = expiry.NewHeap(100) //TODO, size as config parameter go hs.CollectTicker(collect_frequency) go hs.ProcessUpdates() }