Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IEchoServer ¶
type IEchoServer interface { yu.IServer Echo() *echo.Echo Health() Group(path string, m ...echo.MiddlewareFunc) *echo.Group JSON(c echo.Context, data any) error JsonOK(c echo.Context, data any) error JsonErr(c echo.Context, err error) error JsonMsg(c echo.Context, msg string) error PbOK(c echo.Context, m proto.Message) error GzipPbOK(c echo.Context, m proto.Message) error PbErr(c echo.Context, err error) error Promethous(name, pass string) PromeMetrics() echo.MiddlewareFunc BasicAuth(name, pass string) echo.MiddlewareFunc NoCache() echo.MiddlewareFunc }
IEchoServer echo服务实现接口
type IGinServer ¶
type IGinServer interface { yu.IServer Gin() *gin.Engine Health() Group(path string, handlers ...gin.HandlerFunc) *gin.RouterGroup JSON(c *gin.Context, data any) GzipJSON(c *gin.Context, data any) JsonOK(c *gin.Context, data any) JsonErr(c *gin.Context, err error) JsonMsg(c *gin.Context, msg string) PbOK(c *gin.Context, m proto.Message) error GzipPbOK(c *gin.Context, m proto.Message) error PbErr(c *gin.Context, err error) error Promethous(name, pass string) NoCache() gin.HandlerFunc BasicAuth(username, password string) gin.HandlerFunc LogControl(trace bool, skip []string) gin.HandlerFunc CORS(origin, methods, headers, age string) gin.HandlerFunc DefaultCORS() gin.HandlerFunc PromeMetrics() gin.HandlerFunc }
IEchoServer gin服务实现接口
type IGrpcServer ¶
type IGrpcServer interface { yu.IServer grpc.ServiceRegistrar }
IGrpcServer grpc server接口
func NewGrpcServer ¶
func NewGrpcServer(name, addr string, reg func(IGrpcServer), opt ...grpc.ServerOption) IGrpcServer
NewGrpcServer 创建GrpcServer
Click to show internal directories.
Click to hide internal directories.