save
parent
c81b014919
commit
905e1779a5
|
@ -50,6 +50,9 @@ func Stop() {
|
|||
}
|
||||
|
||||
func Send(h *History) {
|
||||
if h.Type == "" {
|
||||
h.Type = INFO
|
||||
}
|
||||
Tunnel <- h
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package history
|
||||
|
||||
import "kumoly.io/kumoly/app/system"
|
||||
|
||||
type Service struct {
|
||||
system.BaseService
|
||||
}
|
||||
|
||||
func (srv Service) GetName() string { return "history.Service" }
|
||||
func (srv Service) IsService() bool { return true }
|
||||
func (srv Service) Main() error {
|
||||
Start(DBReceiver)
|
||||
return nil
|
||||
}
|
||||
func (srv Service) Del() {
|
||||
Stop()
|
||||
}
|
|
@ -9,7 +9,7 @@ import (
|
|||
type BaseService struct{}
|
||||
|
||||
func (srv BaseService) GetName() string { return "base" }
|
||||
func (srv BaseService) GetDependencies() []string { return []string{""} }
|
||||
func (srv BaseService) GetDependencies() []string { return []string{} }
|
||||
func (srv BaseService) IsService() bool { return false }
|
||||
func (srv BaseService) Init() error { return nil }
|
||||
func (srv BaseService) Load() error { return nil }
|
||||
|
|
Loading…
Reference in New Issue