Documentation ¶
Index ¶
- func BeginCount(url common.URL, methodName string)
- func EndCount(url common.URL, methodName string)
- 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, value string)
- func (r *RPCResult) Attachment(key, defaultValue string) string
- func (r *RPCResult) Attachments() map[string]string
- func (r *RPCResult) Error() error
- func (r *RPCResult) Result() interface{}
- func (r *RPCResult) SetAttachments(attr map[string]string)
- func (r *RPCResult) SetError(err error)
- func (r *RPCResult) SetResult(rest interface{})
- type Result
- type RpcStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginCount ¶
Types ¶
type BaseExporter ¶
type BaseExporter struct {
// contains filtered or unexported fields
}
func NewBaseExporter ¶
func NewBaseExporter(key string, invoker Invoker, exporterMap *sync.Map) *BaseExporter
func (*BaseExporter) GetInvoker ¶
func (de *BaseExporter) GetInvoker() Invoker
func (*BaseExporter) Unexport ¶
func (de *BaseExporter) Unexport()
type BaseInvoker ¶
type BaseInvoker struct {
// contains filtered or unexported fields
}
func NewBaseInvoker ¶
func NewBaseInvoker(url common.URL) *BaseInvoker
func (*BaseInvoker) Destroy ¶
func (bi *BaseInvoker) Destroy()
func (*BaseInvoker) GetUrl ¶
func (bi *BaseInvoker) GetUrl() common.URL
func (*BaseInvoker) Invoke ¶
func (bi *BaseInvoker) Invoke(invocation Invocation) Result
func (*BaseInvoker) IsAvailable ¶
func (bi *BaseInvoker) IsAvailable() bool
func (*BaseInvoker) IsDestroyed ¶
func (bi *BaseInvoker) IsDestroyed() bool
type BaseProtocol ¶
type BaseProtocol struct {
// contains filtered or unexported fields
}
func NewBaseProtocol ¶
func NewBaseProtocol() 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
func (*BaseProtocol) ExporterMap ¶
func (bp *BaseProtocol) ExporterMap() *sync.Map
func (*BaseProtocol) Invokers ¶
func (bp *BaseProtocol) Invokers() []Invoker
func (*BaseProtocol) SetExporterMap ¶
func (bp *BaseProtocol) SetExporterMap(key string, exporter Exporter)
func (*BaseProtocol) SetInvokers ¶
func (bp *BaseProtocol) SetInvokers(invoker Invoker)
type Invocation ¶
type Protocol ¶
type Protocol interface { Export(invoker Invoker) Exporter Refer(url common.URL) Invoker Destroy() }
Extension - protocol
type RPCResult ¶
func (*RPCResult) AddAttachment ¶
func (*RPCResult) Attachment ¶
func (*RPCResult) Attachments ¶
func (*RPCResult) SetAttachments ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.