You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
471 B

package server
import (
"fmt"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types"
)
func NewServer(protoAddr, transport string, app types.Application) (Service, error) {
var s Service
var err error
switch transport {
case "socket":
s, err = NewSocketServer(protoAddr, app)
case "grpc":
s, err = NewGRPCServer(protoAddr, types.NewGRPCApplication(app))
default:
err = fmt.Errorf("Unknown server type %s", transport)
}
return s, err
}