overflow_server_app/module/member/check_email.go
2017-08-24 17:37:08 +09:00

31 lines
622 B
Go

package member
import (
"fmt"
"git.loafle.net/overflow/overflow_server_app/server"
"github.com/valyala/fasthttp"
"git.loafle.net/overflow/overflow_server_app/backend"
)
func CheckEmail(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) {
//msg := sctx.Value("key1")
grpcPool := sctx.Value("grpc").(backend.Pool)
c, err := grpcPool.Get()
if nil != err {
}
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)
}