Exemple #1
0
func main() {
	proxy.RpcMain(BINARY_NAME, SERVICE_DESC,
		// 验证LB的配置
		proxy.ConfigCheckRpcLB,
		// 根据配置创建一个Server
		func(config *proxy.Config) proxy.Server {
			return proxy.NewThriftLoadBalanceServer(config)
		}, buildDate, gitVersion)

}
Exemple #2
0
func main() {
	proxy.RpcMain(BINARY_NAME, SERVICE_DESC,
		// 验证LB的配置
		proxy.ConfigCheckRpcProxy,
		// 根据配置创建一个Server
		func(config *proxy.Config) proxy.Server {
			// 正式的服务
			return proxy.NewProxyServer(config)
		}, buildDate, gitVersion)

}