summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-02 22:52:32 +0300
committerWolfy-J <[email protected]>2019-05-02 22:52:32 +0300
commit62250fde949d2511b1e030c570bafe2ef3ed2c2d (patch)
tree538a0efeefe7f92e489096850f087b15d6fee8ea /service
parente3f8f80b40d55d9d3c2e858a73cc1befe3f04114 (diff)
symfony way to refernce contributors
Diffstat (limited to 'service')
-rw-r--r--service/watcher/watcher.go (renamed from service/watchdog/watcher.go)12
1 files changed, 6 insertions, 6 deletions
diff --git a/service/watchdog/watcher.go b/service/watcher/watcher.go
index c8c4b3f2..9cf129df 100644
--- a/service/watchdog/watcher.go
+++ b/service/watcher/watcher.go
@@ -1,4 +1,4 @@
-package watchdog
+package watcher
import (
"log"
@@ -6,7 +6,7 @@ import (
)
// disconnect??
-type Watcher struct {
+type Service struct {
// defines how often
interval time.Duration
pool Pool
@@ -15,8 +15,8 @@ type Watcher struct {
}
// NewWatcher creates new pool watcher.
-func NewWatcher(p Pool, i time.Duration) *Watcher {
- w := &Watcher{
+func NewWatcher(p Pool, i time.Duration) *Service {
+ w := &Service{
interval: i,
pool: p,
stop: make(chan interface{}),
@@ -38,11 +38,11 @@ func NewWatcher(p Pool, i time.Duration) *Watcher {
return w
}
-func (w *Watcher) Stop() {
+func (w *Service) Stop() {
close(w.stop)
}
-func (w *Watcher) update() {
+func (w *Service) update() {
for _, w := range w.pool.Workers() {
log.Println(w)