ing
This commit is contained in:
parent
2f70541870
commit
23d5f5406a
4
external/external.go
vendored
4
external/external.go
vendored
|
@ -1,8 +1,8 @@
|
|||
package external
|
||||
|
||||
import (
|
||||
"git.loafle.net/overflow/overflow_gateway_app/external/grpc"
|
||||
"git.loafle.net/overflow/overflow_gateway_app/external/redis"
|
||||
"git.loafle.net/overflow/overflow_gateway_websocket/external/grpc"
|
||||
"git.loafle.net/overflow/overflow_gateway_websocket/external/redis"
|
||||
)
|
||||
|
||||
func ExternalInit() {
|
||||
|
|
12
external/grpc/pool.go
vendored
12
external/grpc/pool.go
vendored
|
@ -6,7 +6,7 @@ import (
|
|||
cgp "git.loafle.net/commons_go/grpc_pool"
|
||||
"git.loafle.net/commons_go/logging"
|
||||
ooas "git.loafle.net/overflow/overflow_api_server/golang"
|
||||
"git.loafle.net/overflow/overflow_gateway_app/conf"
|
||||
"git.loafle.net/overflow/overflow_gateway_websocket/config"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
|
@ -14,10 +14,10 @@ var grpcPool cgp.Pool
|
|||
|
||||
func ExternalInit() {
|
||||
ph := &grpcPoolHandlers{}
|
||||
ph.MaxCapacity = conf.Config.GRPC.Pool.MaxCapacity
|
||||
ph.MaxIdle = conf.Config.GRPC.Pool.MaxIdle
|
||||
ph.IdleTimeout = conf.Config.GRPC.Pool.IdleTimeout
|
||||
ph.Wait = conf.Config.GRPC.Pool.Wait
|
||||
ph.MaxCapacity = config.Config.GRPC.Pool.MaxCapacity
|
||||
ph.MaxIdle = config.Config.GRPC.Pool.MaxIdle
|
||||
ph.IdleTimeout = config.Config.GRPC.Pool.IdleTimeout
|
||||
ph.Wait = config.Config.GRPC.Pool.Wait
|
||||
|
||||
grpcPool = cgp.New(ph)
|
||||
|
||||
|
@ -39,7 +39,7 @@ type grpcPoolHandlers struct {
|
|||
|
||||
func (h *grpcPoolHandlers) Dial() (*grpc.ClientConn, interface{}, error) {
|
||||
var err error
|
||||
conn, err := grpc.Dial(conf.Config.GRPC.Addr, grpc.WithInsecure())
|
||||
conn, err := grpc.Dial(config.Config.GRPC.Addr, grpc.WithInsecure())
|
||||
if nil != err {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
|
|
@ -6,11 +6,6 @@ import:
|
|||
- package: git.loafle.net/overflow/overflow_api_server
|
||||
subpackages:
|
||||
- golang
|
||||
- package: git.loafle.net/overflow/overflow_gateway_app
|
||||
subpackages:
|
||||
- conf
|
||||
- external/grpc
|
||||
- external/redis
|
||||
- package: github.com/garyburd/redigo
|
||||
subpackages:
|
||||
- redis
|
||||
|
|
Loading…
Reference in New Issue
Block a user