2017-08-23 09:19:21 +00:00
|
|
|
package member
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"git.loafle.net/overflow/overflow_server_app/server"
|
|
|
|
|
|
|
|
"github.com/valyala/fasthttp"
|
2017-08-24 08:37:08 +00:00
|
|
|
"git.loafle.net/overflow/overflow_server_app/backend"
|
2017-08-23 09:19:21 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func CheckEmail(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) {
|
2017-08-24 08:37:08 +00:00
|
|
|
//msg := sctx.Value("key1")
|
2017-08-23 09:19:21 +00:00
|
|
|
|
2017-08-24 08:37:08 +00:00
|
|
|
grpcPool := sctx.Value("grpc").(backend.Pool)
|
|
|
|
c, err := grpcPool.Get()
|
|
|
|
if nil != err {
|
2017-08-23 09:19:21 +00:00
|
|
|
|
2017-08-24 08:37:08 +00:00
|
|
|
}
|
|
|
|
defer c.Close()
|
|
|
|
|
|
|
|
fmt.Fprintf(ctx, "avail: %d\n", grpcPool.Available())
|
|
|
|
|
|
|
|
signinId := string(ctx.FormValue("signinId"))
|
|
|
|
params := []string{signinId}
|
|
|
|
|
|
|
|
r, err := c.Exec("MemberService", "read", params)
|
|
|
|
|
|
|
|
fmt.Fprintf(ctx, "Welcome!!!!: %s \n", r)
|
2017-08-23 09:19:21 +00:00
|
|
|
}
|