Documentation ¶
Index ¶
- Variables
- func BeginCount(url *common.URL, methodName string)
- func CleanAllStatus()
- func CurrentTimeMillis() int64
- func EndCount(url *common.URL, methodName string, elapsed int64, succeeded bool)
- func GetAndRefreshState() bool
- func GetInvokerHealthyStatus(invoker Invoker) bool
- func RemoveInvokerUnhealthyStatus(invoker Invoker)
- func RemoveUrlKeyUnhealthyStatus(key string)
- func SetInvokerUnhealthyStatus(invoker Invoker)
- func TryRefreshBlackList()
- type BaseExporter
- type BaseInvoker
- type BaseProtocol
- func (bp *BaseProtocol) Destroy()
- func (bp *BaseProtocol) Export(invoker Invoker) Exporter
- func (bp *BaseProtocol) ExporterMap() *sync.Map
- func (bp *BaseProtocol) Invokers() []Invoker
- func (bp *BaseProtocol) Refer(url *common.URL) Invoker
- func (bp *BaseProtocol) SetExporterMap(key string, exporter Exporter)
- func (bp *BaseProtocol) SetInvokers(invoker Invoker)
- type Exporter
- type Invocation
- type Invoker
- type Protocol
- type RPCResult
- func (r *RPCResult) AddAttachment(key string, value interface{})
- func (r *RPCResult) Attachment(key string, defaultValue interface{}) interface{}
- func (r *RPCResult) Attachments() map[string]interface{}
- func (r *RPCResult) Error() error
- func (r *RPCResult) Result() interface{}
- func (r *RPCResult) SetAttachments(attr map[string]interface{})
- func (r *RPCResult) SetError(err error)
- func (r *RPCResult) SetResult(rest interface{})
- type RPCStatus
- func (rpc *RPCStatus) GetActive() int32
- func (rpc *RPCStatus) GetFailed() int32
- func (rpc *RPCStatus) GetFailedElapsed() int64
- func (rpc *RPCStatus) GetFailedMaxElapsed() int64
- func (rpc *RPCStatus) GetLastRequestFailedTimestamp() int64
- func (rpc *RPCStatus) GetMaxElapsed() int64
- func (rpc *RPCStatus) GetSucceededMaxElapsed() int64
- func (rpc *RPCStatus) GetSuccessiveRequestFailureCount() int32
- func (rpc *RPCStatus) GetTotal() int32
- func (rpc *RPCStatus) GetTotalElapsed() int64
- type Result
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CurrentTimeMillis ¶ added in v1.4.0
func CurrentTimeMillis() int64
CurrentTimeMillis get current timestamp
func GetAndRefreshState ¶ added in v1.5.6
func GetAndRefreshState() bool
func GetInvokerHealthyStatus ¶ added in v1.5.6
GetInvokerHealthyStatus get invoker's conn healthy status
func RemoveInvokerUnhealthyStatus ¶ added in v1.5.6
func RemoveInvokerUnhealthyStatus(invoker Invoker)
RemoveInvokerUnhealthyStatus remove unhealthy status of target invoker from blacklist
func RemoveUrlKeyUnhealthyStatus ¶ added in v1.5.6
func RemoveUrlKeyUnhealthyStatus(key string)
RemoveUrlKeyUnhealthyStatus called when event of provider unregister, delete from black list
func SetInvokerUnhealthyStatus ¶ added in v1.5.6
func SetInvokerUnhealthyStatus(invoker Invoker)
SetInvokerUnhealthyStatus add target invoker to black list
func TryRefreshBlackList ¶ added in v1.5.6
func TryRefreshBlackList()
TryRefreshBlackList start 3 gr to check at most block=16 invokers in black list if target invoker is available, then remove it from black list
Types ¶
type BaseExporter ¶
type BaseExporter struct {
// contains filtered or unexported fields
}
BaseExporter is default exporter implement.
func NewBaseExporter ¶
func NewBaseExporter(key string, invoker Invoker, exporterMap *sync.Map) *BaseExporter
NewBaseExporter creates a new BaseExporter
func (*BaseExporter) GetInvoker ¶
func (de *BaseExporter) GetInvoker() Invoker
GetInvoker gets invoker
type BaseInvoker ¶
type BaseInvoker struct {
// contains filtered or unexported fields
}
BaseInvoker provides default invoker implement
func NewBaseInvoker ¶
func NewBaseInvoker(url *common.URL) *BaseInvoker
NewBaseInvoker creates a new BaseInvoker
func (*BaseInvoker) Destroy ¶
func (bi *BaseInvoker) Destroy()
Destroy changes available and destroyed flag
func (*BaseInvoker) GetURL ¶ added in v1.5.7
func (bi *BaseInvoker) GetURL() *common.URL
GetURL gets base invoker URL
func (*BaseInvoker) Invoke ¶
func (bi *BaseInvoker) Invoke(context context.Context, invocation Invocation) Result
Invoke provides default invoker implement
func (*BaseInvoker) IsAvailable ¶
func (bi *BaseInvoker) IsAvailable() bool
IsAvailable gets available flag
func (*BaseInvoker) IsDestroyed ¶
func (bi *BaseInvoker) IsDestroyed() bool
IsDestroyed gets destroyed flag
type BaseProtocol ¶
type BaseProtocol struct {
// contains filtered or unexported fields
}
BaseProtocol is default protocol implement.
func NewBaseProtocol ¶
func NewBaseProtocol() BaseProtocol
NewBaseProtocol creates a new BaseProtocol
func (*BaseProtocol) Destroy ¶
func (bp *BaseProtocol) Destroy()
Destroy will destroy all invoker and exporter, so it only is called once.
func (*BaseProtocol) Export ¶
func (bp *BaseProtocol) Export(invoker Invoker) Exporter
Export is default export implement.
func (*BaseProtocol) ExporterMap ¶
func (bp *BaseProtocol) ExporterMap() *sync.Map
ExporterMap gets exporter map.
func (*BaseProtocol) Invokers ¶
func (bp *BaseProtocol) Invokers() []Invoker
Invokers gets all invokers
func (*BaseProtocol) Refer ¶
func (bp *BaseProtocol) Refer(url *common.URL) Invoker
Refer is default refer implement.
func (*BaseProtocol) SetExporterMap ¶
func (bp *BaseProtocol) SetExporterMap(key string, exporter Exporter)
SetExporterMap set @exporter with @key to local memory.
func (*BaseProtocol) SetInvokers ¶
func (bp *BaseProtocol) SetInvokers(invoker Invoker)
SetInvokers sets invoker into local memory
type Exporter ¶
type Exporter interface { // GetInvoker gets invoker. GetInvoker() Invoker // Unexport exported service. Unexport() }
Exporter wrapping invoker
type Invocation ¶
type Invocation interface { // MethodName gets invocation method name. MethodName() string // ParameterTypeNames gets invocation parameter type names. ParameterTypeNames() []string // ParameterTypes gets invocation parameter types. ParameterTypes() []reflect.Type // ParameterValues gets invocation parameter values. ParameterValues() []reflect.Value // Arguments gets arguments. Arguments() []interface{} // Reply gets response of request Reply() interface{} // Attachments gets all attachments Attachments() map[string]interface{} // AttachmentsByKey gets attachment by key , if nil then return default value. (It will be deprecated in the future) AttachmentsByKey(string, string) string Attachment(string) interface{} // Attributes refers to dubbo 2.7.6. It is different from attachment. It is used in internal process. Attributes() map[string]interface{} // AttributeByKey gets attribute by key , if nil then return default value AttributeByKey(string, interface{}) interface{} // SetAttachments sets attribute by @key and @value. SetAttachments(key string, value interface{}) // Invoker gets the invoker in current context. Invoker() Invoker }
Invocation is a invocation for each remote method.
type Invoker ¶
type Invoker interface { common.Node // Invoke the invocation and return result. Invoke(context.Context, Invocation) Result }
Invoker the service invocation interface for the consumer Extension - Invoker
func GetBlackListInvokers ¶ added in v1.5.6
GetBlackListInvokers get at most size of blockSize invokers from black list
type Protocol ¶
type Protocol interface { // Export service for remote invocation Export(invoker Invoker) Exporter // Refer a remote service Refer(url *common.URL) Invoker // Destroy will destroy all invoker and exporter, so it only is called once. Destroy() }
Protocol Extension - protocol
type RPCResult ¶
RPCResult is default RPC result.
func (*RPCResult) AddAttachment ¶
AddAttachment adds the specified map to existing attachments in this instance.
func (*RPCResult) Attachment ¶
Attachment gets attachment by key with default value.
func (*RPCResult) Attachments ¶
Attachments gets all attachments
func (*RPCResult) SetAttachments ¶
SetAttachments replaces the existing attachments with the specified param.
type RPCStatus ¶ added in v1.4.0
type RPCStatus struct {
// contains filtered or unexported fields
}
RPCStatus is URL statistics.
func GetMethodStatus ¶ added in v1.4.0
GetMethodStatus get method RPC status.
func GetURLStatus ¶ added in v1.4.0
GetURLStatus get URL RPC status.
func (*RPCStatus) GetFailedElapsed ¶ added in v1.4.0
GetFailedElapsed gets failed elapsed.
func (*RPCStatus) GetFailedMaxElapsed ¶ added in v1.4.0
GetFailedMaxElapsed gets failed max elapsed.
func (*RPCStatus) GetLastRequestFailedTimestamp ¶ added in v1.4.0
GetLastRequestFailedTimestamp gets last request failed timestamp.
func (*RPCStatus) GetMaxElapsed ¶ added in v1.4.0
GetMaxElapsed gets max elapsed.
func (*RPCStatus) GetSucceededMaxElapsed ¶ added in v1.4.0
GetSucceededMaxElapsed gets succeeded max elapsed.
func (*RPCStatus) GetSuccessiveRequestFailureCount ¶ added in v1.4.0
GetSuccessiveRequestFailureCount gets successive request failure count.
func (*RPCStatus) GetTotalElapsed ¶ added in v1.4.0
GetTotalElapsed gets total elapsed.
type Result ¶
type Result interface { // SetError sets error. SetError(error) // Error gets error. Error() error // SetResult sets invoker result. SetResult(interface{}) // Result gets invoker result. Result() interface{} // SetAttachments replaces the existing attachments with the specified param. SetAttachments(map[string]interface{}) // Attachments gets all attachments Attachments() map[string]interface{} // AddAttachment adds the specified map to existing attachments in this instance. AddAttachment(string, interface{}) // Attachment gets attachment by key with default value. Attachment(string, interface{}) interface{} }
Result is a RPC result
Directories ¶
Path | Synopsis |
---|---|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
hessian2
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
impl
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
dubbo3
|
|
protoc-gen-dubbo3
Module
|
|
internal
just for test, never use internal for production.
|
just for test, never use internal for production. |
protoc-gen-dubbo/plugin/dubbo
Package dubbo plugin for protobuf.
|
Package dubbo plugin for protobuf. |
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |