Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HeaderAcceptEncoding ... HeaderAcceptEncoding = "Accept-Encoding" // HeaderContentType ... HeaderContentType = "Content-Type" // HRPC Errord HeaderHRPCErr = "HRPC-Errord" )
Headers
View Source
const ( // MIMEApplicationJSON ... MIMEApplicationJSON = "application/json" // MIMEApplicationJSONCharsetUTF8 ... MIMEApplicationJSONCharsetUTF8 = MIMEApplicationJSON + "; " + charsetUTF8 // MIMEApplicationProtobuf ... MIMEApplicationProtobuf = "application/protobuf" )
MIME types
View Source
const ModName = "server.fasthttp"
ModName named a mod
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string
Port int
Deployment string
Debug bool
DisableMetric bool
DisableTrace bool
DisablePrintStack bool
// ServiceAddress service address in registry info, default to 'Host:Port'
ServiceAddress string
CertFile string
PrivateFile string
EnableTLS bool
SlowQueryThresholdInMilli int64
ReadBufferSize int
WriteBufferSize int
ReduceMemoryUsage bool
Concurrency int
// contains filtered or unexported fields
}
Config HTTP config
func (*Config) WithLogger ¶
WithLogger ...
type Middleware ¶
type Middleware func(h fasthttp.RequestHandler) fasthttp.RequestHandler
type Server ¶
Server ...
func (*Server) GracefulStop ¶
GracefulStop implements server.Server interface it will stop echo server gracefully
func (*Server) Info ¶
func (s *Server) Info() *server.ServiceInfo
Info returns server info, used by governor and consumer balancer
Click to show internal directories.
Click to hide internal directories.