Skip to content

Commit

Permalink
Mega refactoring. Integration DI #3
Browse files Browse the repository at this point in the history
  • Loading branch information
kihamo committed Jan 17, 2020
1 parent fd5f2d7 commit a8fa596
Show file tree
Hide file tree
Showing 36 changed files with 325 additions and 175 deletions.
10 changes: 0 additions & 10 deletions components/boggart/bind.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package boggart

import (
"context"

"github.com/kihamo/go-workers/event"
)

Expand Down Expand Up @@ -40,11 +38,3 @@ type Bind interface{}
type BindRunner interface {
Run() error
}

type BindHasReadinessProbe interface {
ReadinessProbe(context.Context) error
}

type BindHasLivenessProbe interface {
LivenessProbe(context.Context) error
}
1 change: 1 addition & 0 deletions components/boggart/bind/broadlink/rm/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

type Bind struct {
di.MQTTBind
di.ProbesBind

config *ConfigRM

Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/broadlink/sp3s/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config

Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/chromecast/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.LoggerBind
di.ProbesBind

config *Config

Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/ds18b20/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
type Bind struct {
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
}
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/esphome/mqtt/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
type Bind struct {
di.MetaBind
di.MQTTBind
di.ProbesBind

config *Config
components sync.Map
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/esphome/native_api/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
provider *api.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/fcm/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

type Bind struct {
di.MQTTBind
di.ProbesBind

config *Config
messaging *messaging.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/google_home/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Bind struct {
di.MetaBind
di.WorkersBind
di.LoggerBind
di.ProbesBind

provider *home.Client
}
1 change: 1 addition & 0 deletions components/boggart/bind/grafana/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
type Bind struct {
di.MQTTBind
di.LoggerBind
di.ProbesBind

config *Config
provider *grafana.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/herospeed/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
client *herospeed.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/hikvision/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Bind struct {
di.MQTTBind
di.WorkersBind
di.LoggerBind
di.ProbesBind

mutex sync.RWMutex

Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/hilink/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type Bind struct {
di.MQTTBind
di.WorkersBind
di.LoggerBind
di.ProbesBind

config *Config
client *hilink.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/homie/esp/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.LoggerBind
di.ProbesBind

config *Config
lastUpdate atomic.TimeNull
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/integratorit/elektroset/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
type Bind struct {
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
client *elektroset.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/integratorit/mosenergosbyt/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var services = map[string]string{
type Bind struct {
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
client *mosenergosbyt.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/led_wifi/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
bulb *wifiled.Bulb
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/lg_webos/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Bind struct {
di.MQTTBind
di.WorkersBind
di.LoggerBind
di.ProbesBind

config *Config
mutex sync.RWMutex
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/mercury/v1/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
type Bind struct {
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
provider *mercury.MercuryV1
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/mercury/v3/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
provider *mercury.MercuryV3
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/mikrotik/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
address *url.URL
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/nut/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
mutex sync.Mutex
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/octoprint/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Bind struct {
di.MQTTBind
di.WorkersBind
di.LoggerBind
di.ProbesBind

config *Config
provider *octoprint.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/pulsar/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const (
type Bind struct {
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
provider *pulsar.HeatMeter
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/rkcm/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Bind struct {
di.MQTTBind
di.WorkersBind
di.LoggerBind
di.ProbesBind

config *Config
client *rkcm.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/samsung_tizen/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
mutex sync.RWMutex
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/serial/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type Bind struct {
status uint32 // 0 - default, 1 - started, 2 - failed

di.LoggerBind
di.ProbesBind

server serial_network.Server
}
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/softvideo/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
type Bind struct {
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
provider *softvideo.Client
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/telegram/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.LoggerBind
di.ProbesBind

config *Config

Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/xiaomi/roborock/miio/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Bind struct {
di.MetaBind
di.MQTTBind
di.WorkersBind
di.ProbesBind

config *Config
device *vacuum.Device
Expand Down
1 change: 1 addition & 0 deletions components/boggart/bind/xmeye/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Bind struct {
di.MQTTBind
di.WorkersBind
di.LoggerBind
di.ProbesBind

config *Config
alarmStreaming *xmeye.AlertStreaming
Expand Down
Loading

0 comments on commit a8fa596

Please sign in to comment.