common -> cmn

This commit is contained in:
Jae Kwon
2017-01-23 20:26:17 -08:00
parent a33b75fe8b
commit 9745f07bee
15 changed files with 42 additions and 42 deletions

View File

@ -7,13 +7,13 @@ import (
"google.golang.org/grpc"
"github.com/tendermint/abci/types"
common "github.com/tendermint/go-common"
cmn "github.com/tendermint/go-common"
)
// var maxNumberConnections = 2
type GRPCServer struct {
common.BaseService
cmn.BaseService
proto string
addr string
@ -23,7 +23,7 @@ type GRPCServer struct {
app types.ABCIApplicationServer
}
func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) (common.Service, error) {
func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) (cmn.Service, error) {
parts := strings.SplitN(protoAddr, "://", 2)
proto, addr := parts[0], parts[1]
s := &GRPCServer{
@ -32,7 +32,7 @@ func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) (common.Se
listener: nil,
app: app,
}
s.BaseService = *common.NewBaseService(nil, "ABCIServer", s)
s.BaseService = *cmn.NewBaseService(nil, "ABCIServer", s)
_, err := s.Start() // Just start it
return s, err
}

View File

@ -4,11 +4,11 @@ import (
"fmt"
"github.com/tendermint/abci/types"
common "github.com/tendermint/go-common"
cmn "github.com/tendermint/go-common"
)
func NewServer(protoAddr, transport string, app types.Application) (common.Service, error) {
var s common.Service
func NewServer(protoAddr, transport string, app types.Application) (cmn.Service, error) {
var s cmn.Service
var err error
switch transport {
case "socket":

View File

@ -9,13 +9,13 @@ import (
"sync"
"github.com/tendermint/abci/types"
common "github.com/tendermint/go-common"
cmn "github.com/tendermint/go-common"
)
// var maxNumberConnections = 2
type SocketServer struct {
common.BaseService
cmn.BaseService
proto string
addr string
@ -29,7 +29,7 @@ type SocketServer struct {
app types.Application
}
func NewSocketServer(protoAddr string, app types.Application) (common.Service, error) {
func NewSocketServer(protoAddr string, app types.Application) (cmn.Service, error) {
parts := strings.SplitN(protoAddr, "://", 2)
proto, addr := parts[0], parts[1]
s := &SocketServer{
@ -39,7 +39,7 @@ func NewSocketServer(protoAddr string, app types.Application) (common.Service, e
app: app,
conns: make(map[int]net.Conn),
}
s.BaseService = *common.NewBaseService(nil, "ABCIServer", s)
s.BaseService = *cmn.NewBaseService(nil, "ABCIServer", s)
_, err := s.Start() // Just start it
return s, err
}