2024-11-29 21:53:59 +08:00
|
|
|
// Code generated by Kitex v0.9.1. DO NOT EDIT.
|
2024-05-17 18:02:10 +08:00
|
|
|
package pushservice
|
|
|
|
|
|
|
|
import (
|
|
|
|
push "gitea.timerzz.com/kedaya_haitao/pusher/kitex_gen/push"
|
|
|
|
server "github.com/cloudwego/kitex/server"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewServer creates a server.Server with the given handler and options.
|
|
|
|
func NewServer(handler push.PushService, opts ...server.Option) server.Server {
|
|
|
|
var options []server.Option
|
|
|
|
|
|
|
|
options = append(options, opts...)
|
|
|
|
options = append(options, server.WithCompatibleMiddlewareForUnary())
|
|
|
|
|
|
|
|
svr := server.NewServer(options...)
|
|
|
|
if err := svr.RegisterService(serviceInfo(), handler); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
return svr
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterService(svr server.Server, handler push.PushService, opts ...server.RegisterOption) error {
|
|
|
|
return svr.RegisterService(serviceInfo(), handler, opts...)
|
|
|
|
}
|