Documentation ¶
Index ¶
- func LoadService(wrapper *rpcConsumerWrapper, rpcConfig *config.RpcConfig) error
- func RegisterConsumer(consumer RpcConsumer)
- func ServiceLoad() error
- type Directory
- type FailFastClusterInvoker
- type GenericService
- type MethodSpecial
- type ProviderInvoker
- type ReferConfig
- type RpcConsumer
- type RpcConsumerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadService ¶
func RegisterConsumer ¶
func RegisterConsumer(consumer RpcConsumer)
Types ¶
type Directory ¶
type Directory interface { ListProviderUrls(serviceName string) []*config.URL LookupProvider(serviceName string, url *config.URL) (*transport.Provider, error) InvalidProvider(serviceNmae string, url *config.URL) error DeleteProvider(serviceNmae string, url *config.URL) error // contains filtered or unexported methods }
func GetDirectory ¶
func GetDirectory() Directory
type FailFastClusterInvoker ¶
type FailFastClusterInvoker struct { Directory Next framework.Invoker LB slb.LoadBalance Retries int32 }
func NewFailFastClusterInvoker ¶
func NewFailFastClusterInvoker(invoker framework.Invoker, lb slb.LoadBalance, retris int32) *FailFastClusterInvoker
func (*FailFastClusterInvoker) Invoke ¶
func (f *FailFastClusterInvoker) Invoke(context *framework.InvokerContext) (*entity.Result, error)
type GenericService ¶
type MethodSpecial ¶
type ProviderInvoker ¶
type ProviderInvoker struct { }
func NewProviderInvoker ¶
func NewProviderInvoker() *ProviderInvoker
func (*ProviderInvoker) Invoke ¶
func (p *ProviderInvoker) Invoke(context *framework.InvokerContext) (*entity.Result, error)
type ReferConfig ¶
type ReferConfig struct { //是否泛化 Generic bool Retries int32 SerialType serializations.SERIALIZATION Fallback map[string]interface{} JavaClassName string Version string Group string Timeout time.Duration LoadBalance string HashNodes int HashArgsIndex string UniqueMetaName string UniqueServiceName string //ipv4:port TargetAddress []string MethodSpecials []*MethodSpecial IsInit bool // contains filtered or unexported fields }
func NewReferConfig ¶
func NewReferConfig(javaClass string, timeout time.Duration, targetAddress string) *ReferConfig
func (*ReferConfig) AddMethodSpecial ¶
func (r *ReferConfig) AddMethodSpecial(special *MethodSpecial)
func (*ReferConfig) GetGenericService ¶
func (r *ReferConfig) GetGenericService() (*GenericService, error)
func (*ReferConfig) Init ¶
func (r *ReferConfig) Init()
func (*ReferConfig) SetGeneric ¶
func (r *ReferConfig) SetGeneric(generic bool)
func (*ReferConfig) SetTargetAddresses ¶
func (r *ReferConfig) SetTargetAddresses(targetAddresses string)
type RpcConsumer ¶
type RpcConsumer interface {
ConsumerClassName() string
}
type RpcConsumerFunc ¶
type RpcConsumerFunc func() string
func (RpcConsumerFunc) ConsumerClassName ¶
func (t RpcConsumerFunc) ConsumerClassName() string
Click to show internal directories.
Click to hide internal directories.