Skip to content

Commit

Permalink
Merge pull request #270 from ondrej-fabry/master
Browse files Browse the repository at this point in the history
Fix transport for status check
  • Loading branch information
ondrej-fabry authored May 23, 2018
2 parents 53d9f11 + 919b55a commit cef076b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions flavors/connectors/all_connectors_flavor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package connectors

import (
"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/datasync"
"github.com/ligato/cn-infra/datasync/kvdbsync"
"github.com/ligato/cn-infra/datasync/resync"
"github.com/ligato/cn-infra/db/keyval/consul"
Expand Down Expand Up @@ -93,6 +94,11 @@ func (f *AllConnectorsFlavor) Inject() bool {
f.ETCD.Deps.Resync = &f.ResyncOrch
InjectKVDBSync(&f.ETCDDataSync, &f.ETCD, f.ETCD.PluginName, f.FlavorLocal, &f.ResyncOrch)

f.FlavorLocal.StatusCheck.Transport = &datasync.CompositeKVProtoWriter{Adapters: []datasync.KeyProtoValWriter{
&f.ETCDDataSync,
&f.ConsulDataSync,
}}

f.Redis.Deps.PluginInfraDeps = *f.InfraDeps("redis", local.WithConf())
InjectKVDBSync(&f.RedisDataSync, &f.Redis, f.Redis.PluginName, f.FlavorLocal, &f.ResyncOrch)

Expand Down
4 changes: 0 additions & 4 deletions flavors/connectors/connectors_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,5 @@ func InjectKVDBSync(dbsync *kvdbsync.Plugin,
//Note, not injecting local.ETCDDataSync.ResyncOrch here

dbsync.ServiceLabel = &local.ServiceLabel

if local.StatusCheck.Transport == nil {
local.StatusCheck.Transport = dbsync
}
}
}

0 comments on commit cef076b

Please sign in to comment.