Documentation ¶
Index ¶
- type Server
- type ServerOption
- func WithAddress(addr string) ServerOption
- func WithClientEnableTracing(enableTracing bool) ServerOption
- func WithDebugMode() ServerOption
- func WithEnTransNames() ServerOption
- func WithEnableMetrics(enable bool) ServerOption
- func WithEnableProfiling(enable bool) ServerOption
- func WithEnableSocketIoServer(enableSocketIoServer bool) ServerOption
- func WithMiddlewares(middlewares ...gin.HandlerFunc) ServerOption
- func WithReleaseMode() ServerOption
- func WithSocketIoServer(socketIoServer *socketio.Server) ServerOption
- func WithTLSConfig(certFile, keyFile string) ServerOption
- func WithTestMode() ServerOption
- func WithTransName(transName string) ServerOption
- func WithZhTransNames() ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server wrapper for gin.Engine
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
func (*Server) RegistryWebsocket ¶
func (*Server) SocketIoServer ¶
func (*Server) Translator ¶
func (s *Server) Translator() ut.Translator
type ServerOption ¶
type ServerOption func(*Server)
func WithAddress ¶
func WithAddress(addr string) ServerOption
func WithClientEnableTracing ¶
func WithClientEnableTracing(enableTracing bool) ServerOption
WithClientEnableTracing 设置是否开启链路追踪
func WithDebugMode ¶
func WithDebugMode() ServerOption
func WithEnTransNames ¶
func WithEnTransNames() ServerOption
func WithEnableMetrics ¶
func WithEnableMetrics(enable bool) ServerOption
func WithEnableProfiling ¶
func WithEnableProfiling(enable bool) ServerOption
func WithEnableSocketIoServer ¶
func WithEnableSocketIoServer(enableSocketIoServer bool) ServerOption
func WithMiddlewares ¶
func WithMiddlewares(middlewares ...gin.HandlerFunc) ServerOption
func WithReleaseMode ¶
func WithReleaseMode() ServerOption
func WithSocketIoServer ¶
func WithSocketIoServer(socketIoServer *socketio.Server) ServerOption
func WithTLSConfig ¶
func WithTLSConfig(certFile, keyFile string) ServerOption
WithTLSConfig with TLS config.
func WithTestMode ¶
func WithTestMode() ServerOption
func WithTransName ¶
func WithTransName(transName string) ServerOption
func WithZhTransNames ¶
func WithZhTransNames() ServerOption
Click to show internal directories.
Click to hide internal directories.