Documentation
¶
Index ¶
- func FuncName(i interface{}) (fname string)
- func IsExported(name string) bool
- func ValueOf(i interface{}) reflect.Value
- type Node
- type Options
- type Registry
- func (this *Registry) Get(name string) (srv *Service, ok bool)
- func (this *Registry) Has(name string) (ok bool)
- func (this *Registry) Len() int
- func (this *Registry) Match(path string) (srv *Service, ok bool)
- func (this *Registry) Register(i interface{}) error
- func (this *Registry) Service(name string) *Service
- func (this *Registry) Services() (r []*Service)
- type Service
- func (this *Service) Match(path string) (node *Node, ok bool)
- func (this *Service) Name() string
- func (this *Service) Paths() (r []string)
- func (this *Service) Prefix() string
- func (this *Service) Register(i interface{}, prefix ...string) error
- func (this *Service) RegisterFun(i interface{}, prefix ...string) error
- func (this *Service) RegisterStruct(i interface{}, prefix ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExported ¶
Types ¶
type Options ¶
type Options struct {
Format func(string) string //格式化路径
Filter func(*Service, *Node) bool //用于判断struct中的方法是否合法接口
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions() *Options
type Registry ¶
type Registry struct {
*Options
// contains filtered or unexported fields
}
type Service ¶
type Service struct {
*Options
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Match ¶
Match 匹配一个路径 path : $prefix/$methodName path : $prefix/$nodeName/$methodName
func (*Service) RegisterFun ¶
func (*Service) RegisterStruct ¶
Register 注册一组handle
Click to show internal directories.
Click to hide internal directories.