diff --git a/core/db_tkrzw.go b/core/db_tkrzw.go deleted file mode 100644 index b7a6cfe..0000000 --- a/core/db_tkrzw.go +++ /dev/null @@ -1,53 +0,0 @@ -package core - -import ( - "bytes" - "encoding/json" - "fmt" - "log" - "os" - "path" - "sort" - "sync" - "time" - - "github.com/oklog/ulid/v2" - "github.com/estraier/tkrzw-go" - - . "git.exozy.me/exozyme/status/scanner" -) - -type Tkrzw struct { - *tkrzw.DBM -} - -func OpenTkrzw(dir string) (Database, error) { - dbm := tkrzw.NewDBM() - status := dbm.Open(path.Join(dir, "casket.tks"), true, map[string]string{}) - if !status.IsOK() { - return nil, status - } - return &Tkrzw{DBM: dbm}, nil - // dbm.Rebuild() -} - -func (dbm *Tkrzw) Persist() error { - status := dbm.Synchronize(true, map[string]string{}) - if !status.IsOK() { - return status - } - return nil -} - -func (dbm *Tkrzw) QueryAllAfter(cutoff time.Time) ([]Row, error) { - panic("not implemented") // TODO: Implement -} - -func (dbm *Tkrzw) StoreServiceStatusBatch(entries ServiceStatusBatch, when time.Time) ([]ServiceStatus, error) { - panic("not implemented") // TODO: Implement -} - -func (dbm *Tkrzw) StoreSelfStatus(status EventType, when time.Time) error { - panic("not implemented") // TODO: Implement -} - diff --git a/go.mod b/go.mod index 65bf373..de9f768 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.21.1 require ( github.com/cbroglie/mustache v1.4.0 - github.com/estraier/tkrzw-go v0.0.0-20240603165139-89707b45d5ab github.com/oklog/ulid/v2 v2.1.0 github.com/pelletier/go-toml/v2 v2.1.0 github.com/prometheus-community/pro-bing v0.3.0 diff --git a/go.sum b/go.sum index 8de935f..6a6eb6e 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,6 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/estraier/tkrzw-go v0.0.0-20240603165139-89707b45d5ab h1:yQbaZGVW+i4XGqOCmngDuuusApVBBqIDPaLMI6JOyXU= -github.com/estraier/tkrzw-go v0.0.0-20240603165139-89707b45d5ab/go.mod h1:vUOsQ39pa/SuhSmt/Nj+FiNFEHhGf58xM61e0EfZQcc= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=