mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
27 lines
420 B
Go
27 lines
420 B
Go
package notifications
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/safing/portbase/modules"
|
|
)
|
|
|
|
var module *modules.Module
|
|
|
|
func init() {
|
|
module = modules.Register("notifications", prep, start, nil, "database", "base")
|
|
}
|
|
|
|
func prep() error {
|
|
return registerConfig()
|
|
}
|
|
|
|
func start() error {
|
|
err := registerAsDatabase()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
go module.StartServiceWorker("cleaner", 1*time.Second, cleaner)
|
|
return nil
|
|
}
|