Versions in this module Expand all Collapse all v1 v1.0.1 Mar 12, 2020 Changes in this version + func Deregister() (err error) + func OnInit(s base.IClusterService, opt ...Option) (err error) + func RegisterRpcFunc(rId core.Rpc_Key, sId string) (err error) + func Registry() (err error) + func UnRegisterRpcFunc(rId core.Rpc_Key, sId string) (err error) + type Consulregistry struct + func (this *Consulregistry) DeregisterSNode(sId string) (err error) + func (this *Consulregistry) GetRpcSubById(rId core.Rpc_Key) (rf *RpcFuncInfo, err error) + func (this *Consulregistry) GetServiceByCategory(category core.S_Category) (n []*ServiceNode, err error) + func (this *Consulregistry) GetServiceById(sId string) (n *ServiceNode, err error) + func (this *Consulregistry) GetServiceByType(sType string) (n []*ServiceNode, err error) + func (this *Consulregistry) Options() Options + func (this *Consulregistry) RegisterRpcSub(rId core.Rpc_Key, sId string) (err error) + func (this *Consulregistry) RegisterSNode(s *ServiceNode) (err error) + func (this *Consulregistry) RpcHandler(idx uint64, data interface{}) + func (this *Consulregistry) SHandler(idx uint64, data interface{}) + func (this *Consulregistry) SNodeHandler(idx uint64, data interface{}) + func (this *Consulregistry) UnRegisterRpcSub(rId core.Rpc_Key, sId string) (err error) + type FindServiceHandle func(snode ServiceNode) + type IRegistry interface + DeregisterSNode func(sId string) (err error) + GetRpcSubById func(rId core.Rpc_Key) (rf *RpcFuncInfo, err error) + GetServiceByCategory func(category core.S_Category) (n []*ServiceNode, err error) + GetServiceById func(sId string) (n *ServiceNode, err error) + GetServiceByType func(sType string) (n []*ServiceNode, err error) + Options func() Options + RegisterRpcSub func(rId core.Rpc_Key, sId string) (err error) + RegisterSNode func(s *ServiceNode) (err error) + UnRegisterRpcSub func(rId core.Rpc_Key, sId string) (err error) + type LoseServiceHandle func(sId string) + type Option func(*Options) + func Address(v string) Option + func FindHandle(v FindServiceHandle) Option + func LoseHandle(v LoseServiceHandle) Option + func RegisterInterval(v time.Duration) Option + func RegisterTTL(v time.Duration) Option + func SetTag(v string) Option + func UpDataHandle(v UpDataServiceHandle) Option + type Options struct + Address string + Find FindServiceHandle + Lose LoseServiceHandle + RegisterInterval time.Duration + RegisterTTL time.Duration + Tag string + Timeout time.Duration + UpData UpDataServiceHandle + type RpcFuncInfo struct + Id string + SubServiceIds map[string]*ServiceRpcSub + func GetRpcFunc(rId core.Rpc_Key) (data *RpcFuncInfo, err error) + type ServiceNode struct + Category core.S_Category + Id string + PreWeight int32 + RpcId string + Tag string + Type string + Version int32 + func GetServiceByCategory(category core.S_Category) (nodes []*ServiceNode, err error) + func GetServiceById(sId string) (node *ServiceNode, err error) + func GetServiceByType(sId string) (nodes []*ServiceNode, err error) + type ServiceRpcSub struct + Id string + SubNum int32 + type UpDataServiceHandle func(snode ServiceNode)