Documentation
¶
Index ¶
- type ContextHandler
- type MethodDescription
- type MethodHandler
- type PBContextFunc
- type PBRequestFunc
- type PBResponseFunc
- type RouteCfg
- type RouteOpt
- func Handler(h ContextHandler) RouteOpt
- func Header(headers ...string) RouteOpt
- func Host(host string) RouteOpt
- func Method(methods ...string) RouteOpt
- func Pattern(pattern string) RouteOpt
- func Prefix(prefix string) RouteOpt
- func Query(queries ...string) RouteOpt
- func Schema(schemas ...string) RouteOpt
- type Server
- type ServerOpt
- type ServiceDescription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextHandler ¶
type MethodDescription ¶
type MethodDescription struct {
MethodName string
Handler MethodHandler
}
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 RouteOpt ¶
type RouteOpt func(cf *RouteCfg)
func Handler ¶
func Handler(h ContextHandler) RouteOpt
type Server ¶
func (*Server) RegisterService ¶
func (srv *Server) RegisterService(sd *ServiceDescription, impl interface{}) error
RegistService
type ServerOpt ¶
type ServerOpt func(*Server)
func IdleTimeout ¶
func ListenAddress ¶
func ReadTimeout ¶
func WriteTimeout ¶
type ServiceDescription ¶
type ServiceDescription struct {
PackageName string
ServiceName string
Implemention interface{}
Methods []MethodDescription
}
Click to show internal directories.
Click to hide internal directories.