This commit is contained in:
crusader 2018-04-25 18:56:25 +09:00
parent a8273a816c
commit f3fa65c8b2
2 changed files with 5 additions and 6 deletions

View File

@ -7,12 +7,12 @@ import (
"sync"
"git.loafle.net/commons/logging-go"
oci "git.loafle.net/overflow/central_api/golang"
oci "git.loafle.net/overflow/central-api/golang"
ocec "git.loafle.net/overflow/commons-go/external/config"
"google.golang.org/grpc"
)
var grpcClient oci.OverflowApiServerClient
var grpcClient oci.CentralAPIClient
func InitPackage(config *ocec.GRPC) {
if nil == config {
@ -23,7 +23,7 @@ func InitPackage(config *ocec.GRPC) {
if nil != err {
logging.Logger().Panic(err)
}
grpcClient = oci.NewOverflowApiServerClient(conn)
grpcClient = oci.NewCentralAPIClient(conn)
logging.Logger().Infof("GRPC: connected to %s", config.Address)
}
@ -31,7 +31,6 @@ func StartPackage(config *ocec.GRPC) {
if nil == config {
return
}
}
func StopPackage(config *ocec.GRPC) {
@ -66,7 +65,7 @@ func Exec(ctx context.Context, method string, params ...string) (string, error)
execMtx.Lock()
defer execMtx.Unlock()
so, err := grpcClient.(oci.OverflowApiServerClient).Exec(ctx, si)
so, err := grpcClient.(oci.CentralAPIClient).Exec(ctx, si)
if nil != err {
return "", err
}

View File

@ -1,6 +1,5 @@
package: git.loafle.net/overflow/gateway
import:
- package: git.loafle.net/overflow/central_api
- package: git.loafle.net/commons/logging-go
- package: google.golang.org/grpc
version: ^1.11.2
@ -8,3 +7,4 @@ import:
version: ^2.0.0
- package: github.com/segmentio/kafka-go
- package: git.loafle.net/commons/util-go
- package: git.loafle.net/overflow/central-api