本文整理匯總了Golang中github.com/micro/go-micro/server.Server.NewHandler方法的典型用法代碼示例。如果您正苦於以下問題:Golang Server.NewHandler方法的具體用法?Golang Server.NewHandler怎麽用?Golang Server.NewHandler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/micro/go-micro/server.Server
的用法示例。
在下文中一共展示了Server.NewHandler方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: RegisterConfigHandler
func RegisterConfigHandler(s server.Server, hdlr ConfigHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&Config{hdlr}, opts...))
}
示例2: RegisterRuleHandler
func RegisterRuleHandler(s server.Server, hdlr RuleHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&Rule{hdlr}, opts...))
}
示例3: RegisterGreeterHandler
func RegisterGreeterHandler(s server.Server, hdlr GreeterHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&Greeter{hdlr}, opts...))
}
示例4: RegisterExampleHandler
func RegisterExampleHandler(s server.Server, hdlr ExampleHandler) {
s.Handle(s.NewHandler(&Example{hdlr}))
}
示例5: RegisterOauth2Handler
func RegisterOauth2Handler(s server.Server, hdlr Oauth2Handler) {
s.Handle(s.NewHandler(&Oauth2{hdlr}))
}
示例6: RegisterHotelHandler
func RegisterHotelHandler(s server.Server, hdlr HotelHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&Hotel{hdlr}, opts...))
}
示例7: RegisterMonitorHandler
func RegisterMonitorHandler(s server.Server, hdlr MonitorHandler) {
s.Handle(s.NewHandler(&Monitor{hdlr}))
}
示例8: RegisterEventHandler
func RegisterEventHandler(s server.Server, hdlr EventHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&Event{hdlr}, opts...))
}
示例9: registerDebugHandler
func registerDebugHandler(s server.Server) {
s.Handle(s.NewHandler(&Debug{s.Options().DebugHandler}, server.InternalHandler(true)))
}
示例10: RegisterSayHandler
func RegisterSayHandler(s server.Server, hdlr SayHandler) {
s.Handle(s.NewHandler(&Say{hdlr}))
}
示例11: RegisterKVHandler
func RegisterKVHandler(s server.Server, hdlr KVHandler) {
s.Handle(s.NewHandler(&KV{hdlr}))
}
示例12: RegisterGreeterHandler
func RegisterGreeterHandler(s server.Server, hdlr GreeterHandler) {
s.Handle(s.NewHandler(&Greeter{hdlr}))
}
示例13: RegisterElasticHandler
func RegisterElasticHandler(s server.Server, hdlr ElasticHandler) {
s.Handle(s.NewHandler(&Elastic{hdlr}))
}
示例14: RegisterKVHandler
func RegisterKVHandler(s server.Server, hdlr KVHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&KV{hdlr}, opts...))
}
示例15: RegisterDBHandler
func RegisterDBHandler(s server.Server, hdlr DBHandler) {
s.Handle(s.NewHandler(&DB{hdlr}))
}