Documentation ¶
Index ¶
- type HealthCheckResp
- type Option
- func BaseContext(f func(net.Listener) context.Context) Option
- func ConnContext(f func(ctx context.Context, c net.Conn) context.Context) Option
- func ConnState(f func(net.Conn, http.ConnState)) Option
- func ErrorLog(l *log.Logger) Option
- func HealthCheck(path string, okStatus int, notOKStatus int) Option
- func IdleTimeout(timeout time.Duration) Option
- func MaxHeaderBytes(size int) Option
- func ReadHeaderTimeout(timeout time.Duration) Option
- func ReadTimeout(timeout time.Duration) Option
- func Registrar(reg registry.Registrar) Option
- func TLS(conf *tls.Config) Option
- func TLSNextProto(fs map[string]func(*http.Server, *tls.Conn, http.Handler)) Option
- func WriteTimeout(timeout time.Duration) Option
- type Server
- func (s *Server) Engin() *gin.Engine
- func (s *Server) HealthCheckPath() string
- func (s *Server) Host() string
- func (s *Server) Port() int
- func (s *Server) Scheme() string
- func (s *Server) SetServiceInfo(getter registry.ServiceInfoGetter)
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) Stop(ctx context.Context) error
- func (s *Server) String() string
- type ServingStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckResp ¶
type HealthCheckResp struct {
Status ServingStatus `json:"status,omitempty"`
}
func (*HealthCheckResp) GetStatus ¶
func (resp *HealthCheckResp) GetStatus() ServingStatus
type Option ¶
type Option func(o *options)
func IdleTimeout ¶
func MaxHeaderBytes ¶
func ReadHeaderTimeout ¶
func ReadTimeout ¶
func TLSNextProto ¶
func WriteTimeout ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HealthCheckPath ¶
func (*Server) SetServiceInfo ¶
func (s *Server) SetServiceInfo(getter registry.ServiceInfoGetter)
type ServingStatus ¶
type ServingStatus int32
const ( UNKNOWN ServingStatus = 0 SERVING ServingStatus = 1 NOT_SERVING ServingStatus = 2 )
func (ServingStatus) String ¶
func (ss ServingStatus) String() string
Click to show internal directories.
Click to hide internal directories.