Event refactor
This commit is contained in:
13
pwd/pwd.go
13
pwd/pwd.go
@@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/play-with-docker/play-with-docker/docker"
|
||||
"github.com/play-with-docker/play-with-docker/event"
|
||||
"github.com/play-with-docker/play-with-docker/pwd/types"
|
||||
"github.com/play-with-docker/play-with-docker/storage"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
@@ -43,10 +44,10 @@ func init() {
|
||||
}
|
||||
|
||||
type pwd struct {
|
||||
docker docker.DockerApi
|
||||
tasks SchedulerApi
|
||||
broadcast BroadcastApi
|
||||
storage storage.StorageApi
|
||||
docker docker.DockerApi
|
||||
tasks SchedulerApi
|
||||
event event.EventApi
|
||||
storage storage.StorageApi
|
||||
}
|
||||
|
||||
type PWDApi interface {
|
||||
@@ -76,8 +77,8 @@ type PWDApi interface {
|
||||
ClientClose(client *types.Client)
|
||||
}
|
||||
|
||||
func NewPWD(d docker.DockerApi, t SchedulerApi, b BroadcastApi, s storage.StorageApi) *pwd {
|
||||
return &pwd{docker: d, tasks: t, broadcast: b, storage: s}
|
||||
func NewPWD(d docker.DockerApi, t SchedulerApi, e event.EventApi, s storage.StorageApi) *pwd {
|
||||
return &pwd{docker: d, tasks: t, event: e, storage: s}
|
||||
}
|
||||
|
||||
func (p *pwd) setGauges() {
|
||||
|
||||
Reference in New Issue
Block a user