本文整理匯總了Golang中github.com/youtube/vitess/go/vt/servenv.GRPCCheckServiceMap函數的典型用法代碼示例。如果您正苦於以下問題:Golang GRPCCheckServiceMap函數的具體用法?Golang GRPCCheckServiceMap怎麽用?Golang GRPCCheckServiceMap使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GRPCCheckServiceMap函數的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: init
func init() {
vtgate.RegisterVTGates = append(vtgate.RegisterVTGates, func(vtGate vtgateservice.VTGateService) {
if servenv.GRPCCheckServiceMap("vtgateservice") {
vtgateservicepb.RegisterVitessServer(servenv.GRPCServer, &VTGate{vtGate})
}
})
}
示例2: init
func init() {
binlog.RegisterUpdateStreamServices = append(binlog.RegisterUpdateStreamServices, func(updateStream proto.UpdateStream) {
if servenv.GRPCCheckServiceMap("updatestream") {
pbs.RegisterUpdateStreamServer(servenv.GRPCServer, New(updateStream))
}
})
}
示例3: init
func init() {
tabletserver.RegisterFunctions = append(tabletserver.RegisterFunctions, func(qsc tabletserver.Controller) {
if servenv.GRPCCheckServiceMap("queryservice") {
queryservicepb.RegisterQueryServer(servenv.GRPCServer, &query{qsc.QueryService()})
}
})
}
示例4: init
func init() {
servenv.OnRun(func() {
if servenv.GRPCCheckServiceMap("vtctl") {
grpcvtctlserver.StartServer(servenv.GRPCServer, ts)
}
})
}
示例5: init
func init() {
tabletmanager.RegisterQueryServices = append(tabletmanager.RegisterQueryServices, func(agent *tabletmanager.ActionAgent) {
if servenv.GRPCCheckServiceMap("tabletmanager") {
tabletmanagerservicepb.RegisterTabletManagerServer(servenv.GRPCServer, &server{agent})
}
})
}
示例6: init
func init() {
tabletserver.QueryServiceControlRegisterFunctions = append(tabletserver.QueryServiceControlRegisterFunctions, func(qsc tabletserver.QueryServiceControl) {
if servenv.GRPCCheckServiceMap("queryservice") {
pbs.RegisterQueryServer(servenv.GRPCServer, New(qsc.QueryService()))
}
})
}
示例7: init
func init() {
servenv.OnRun(func() {
if servenv.GRPCCheckServiceMap("throttler") {
StartServer(servenv.GRPCServer, throttler.GlobalManager)
}
})
}
示例8: init
func init() {
servenv.InitServiceMap("grpc", "mysqlctl")
servenv.OnRun(func() {
if servenv.GRPCCheckServiceMap("mysqlctl") {
grpcmysqlctlserver.StartServer(servenv.GRPCServer, mysqld)
}
})
}
示例9: init
func init() {
servenv.RegisterGRPCFlags()
servenv.OnRun(func() {
if servenv.GRPCCheckServiceMap("vtworker") {
grpcvtworkerserver.StartServer(servenv.GRPCServer, wi)
}
})
}
示例10: init
func init() {
servenv.RegisterGRPCFlags()
tabletserver.RegisterFunctions = append(tabletserver.RegisterFunctions, func(qsc tabletserver.Controller) {
if servenv.GRPCCheckServiceMap("queryservice") {
grpcqueryservice.Register(servenv.GRPCServer, qsc.QueryService())
}
})
}
示例11: init
func init() {
servenv.ServiceMap["grpc-mysqlctl"] = true
servenv.OnRun(func() {
if servenv.GRPCCheckServiceMap("mysqlctl") {
grpcmysqlctlserver.StartServer(servenv.GRPCServer, mysqld)
}
})
}