Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
type HTTPServer struct {
*httpserver.Server
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(opts ...HTTPServerOpt) *HTTPServer
func (*HTTPServer) RegisterService ¶
func (srv *HTTPServer) RegisterService(sd *ServiceDescription, impl interface{}) error
RegistService
type HTTPServerCfg ¶
type HTTPServerCfg struct {
// contains filtered or unexported fields
}
type HTTPServerOpt ¶
type HTTPServerOpt func(*HTTPServerCfg)
func Host ¶
func Host(host string) HTTPServerOpt
type MethodDescription ¶
type MethodDescription struct {
MethodName string
Handler MethodHandler
Option *options.HttpOption
}
type MethodHandler ¶
MethodHandler handler format
type PBContextFunc ¶
var PBContext PBContextFunc
type PBRequestFunc ¶
var PBRequest PBRequestFunc
type PBResponseFunc ¶
type PBResponseFunc func(wr http.ResponseWriter, out proto.Message, err error)
var PBResponse PBResponseFunc
type ServiceDescription ¶
type ServiceDescription struct {
PackageName string
ServiceName string
Implemention interface{}
Methods []MethodDescription
Option *options.ServiceOption
}
type URIFormatFunc ¶
var URIFormat URIFormatFunc
Click to show internal directories.
Click to hide internal directories.