refactor(storage): Remove decommissioned path for memory store (#313)

This commit is contained in:
TwiN
2022-08-11 20:42:56 -04:00
committed by GitHub
parent 262d436533
commit f01b66f083
11 changed files with 61 additions and 79 deletions

View File

@ -1,7 +1,6 @@
package memory
import (
"encoding/gob"
"sort"
"sync"
"time"
@ -13,14 +12,6 @@ import (
"github.com/TwiN/gocache/v2"
)
func init() {
gob.Register(&core.EndpointStatus{})
gob.Register(&core.HourlyUptimeStatistics{})
gob.Register(&core.Uptime{})
gob.Register(&core.Result{})
gob.Register(&core.Event{})
}
// Store that leverages gocache
type Store struct {
sync.RWMutex
@ -32,7 +23,7 @@ type Store struct {
//
// This store holds everything in memory, and if the file parameter is not blank,
// supports eventual persistence.
func NewStore(file string) (*Store, error) {
func NewStore() (*Store, error) {
store := &Store{
cache: gocache.NewCache().WithMaxSize(gocache.NoMaxSize),
}