Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericAPIServer ¶
type GenericAPIServer struct { HttpsInfo *HttpsInfo // https HttpInfo *HttpInfo // http // ShutdownTimeout是用于关闭服务器的超时。这指定服务器运行之前的超时优雅地关机返回。 ShutdownTimeout time.Duration *gin.Engine // contains filtered or unexported fields }
给 http和https构建好应用 返回 外部直接使用
func (*GenericAPIServer) InstallMiddlewares ¶
func (s *GenericAPIServer) InstallMiddlewares()
加载需要加载的中间件
type ServerConfig ¶
type ServerConfig struct { HttpsInfo *HttpsInfo HttpInfo *HttpInfo Jwt *JwtInfo Mode string // gin.Mode Middlewares []string Healthz bool EnableProfiling bool EnableMetrics bool }
Config是用于配置GenericAPIServer的结构。
func NewServerConfig ¶
func NewServerConfig() *ServerConfig
func (*ServerConfig) NewAndInitApiServer ¶
func (c *ServerConfig) NewAndInitApiServer() *GenericAPIServer
根据配置进行应用
Click to show internal directories.
Click to hide internal directories.