adding viper

int

int
This commit is contained in:
Rigel Rozanski
2017-04-08 22:04:06 -04:00
committed by Ethan Buchman
parent 47852122d0
commit cefb2bede0
20 changed files with 218 additions and 162 deletions

View File

@ -1,8 +1,9 @@
package proxy
import (
cmn "github.com/tendermint/tmlibs/common"
"github.com/spf13/viper"
cfg "github.com/tendermint/go-config"
cmn "github.com/tendermint/tmlibs/common"
)
//-----------------------------
@ -16,7 +17,7 @@ type AppConns interface {
Query() AppConnQuery
}
func NewAppConns(config cfg.Config, clientCreator ClientCreator, handshaker Handshaker) AppConns {
func NewAppConns(config *viper.Viper, clientCreator ClientCreator, handshaker Handshaker) AppConns {
return NewMultiAppConn(config, clientCreator, handshaker)
}
@ -34,7 +35,7 @@ type Handshaker interface {
type multiAppConn struct {
cmn.BaseService
config cfg.Config
config *viper.Viper
handshaker Handshaker
@ -46,7 +47,7 @@ type multiAppConn struct {
}
// Make all necessary abci connections to the application
func NewMultiAppConn(config cfg.Config, clientCreator ClientCreator, handshaker Handshaker) *multiAppConn {
func NewMultiAppConn(config *viper.Viper, clientCreator ClientCreator, handshaker Handshaker) *multiAppConn {
multiAppConn := &multiAppConn{
config: config,
handshaker: handshaker,