2025-01-20 16:22:41 +08:00

25 lines
710 B
Go

// Code generated by Kitex v0.9.1. DO NOT EDIT.
package authservice
import (
server "github.com/cloudwego/kitex/server"
auth "github.com/suyiiyii/hertz101/rpc_gen/kitex_gen/auth"
)
// NewServer creates a server.Server with the given handler and options.
func NewServer(handler auth.AuthService, opts ...server.Option) server.Server {
var options []server.Option
options = append(options, opts...)
svr := server.NewServer(options...)
if err := svr.RegisterService(serviceInfo(), handler); err != nil {
panic(err)
}
return svr
}
func RegisterService(svr server.Server, handler auth.AuthService, opts ...server.RegisterOption) error {
return svr.RegisterService(serviceInfo(), handler, opts...)
}