dubbo

package
v3.0.4-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 20 Imported by: 32

Documentation

Overview

Package dubbo implements dubbo rpc protocol.

Index

Constants

View Source
const (
	// DUBBO is dubbo protocol name
	DUBBO = "dubbo"
)

Variables

This section is empty.

Functions

func GetProtocol

func GetProtocol() protocol.Protocol

GetProtocol get a single dubbo protocol.

Types

type DubboCodec

type DubboCodec struct{}

DubboCodec implements remoting.Codec

func (*DubboCodec) Decode

func (c *DubboCodec) Decode(data []byte) (*remoting.DecodeResult, int, error)

Decode data, including request and response.

func (*DubboCodec) EncodeRequest

func (c *DubboCodec) EncodeRequest(request *remoting.Request) (*bytes.Buffer, error)

EncodeRequest encodes request for transport

func (*DubboCodec) EncodeResponse

func (c *DubboCodec) EncodeResponse(response *remoting.Response) (*bytes.Buffer, error)

EncodeResponse encodes response

type DubboExporter

type DubboExporter struct {
	protocol.BaseExporter
}

DubboExporter is dubbo service exporter.

func NewDubboExporter

func NewDubboExporter(key string, invoker protocol.Invoker, exporterMap *sync.Map) *DubboExporter

NewDubboExporter get a DubboExporter.

func (*DubboExporter) UnExport added in v3.0.4

func (de *DubboExporter) UnExport()

Unexport unexport dubbo service exporter.

type DubboInvoker

type DubboInvoker struct {
	protocol.BaseInvoker
	// contains filtered or unexported fields
}

DubboInvoker is implement of protocol.Invoker. A dubboInvoker refers to one service and ip.

func NewDubboInvoker

func NewDubboInvoker(url *common.URL, client *remoting.ExchangeClient) *DubboInvoker

NewDubboInvoker constructor

func (*DubboInvoker) Destroy

func (di *DubboInvoker) Destroy()

Destroy destroy dubbo client invoker.

func (*DubboInvoker) Invoke

Invoke call remoting.

func (*DubboInvoker) IsAvailable

func (di *DubboInvoker) IsAvailable() bool

type DubboProtocol

type DubboProtocol struct {
	protocol.BaseProtocol
	// contains filtered or unexported fields
}

DubboProtocol supports dubbo protocol. It implements Protocol interface for dubbo protocol.

func NewDubboProtocol

func NewDubboProtocol() *DubboProtocol

NewDubboProtocol create a dubbo protocol.

func (*DubboProtocol) Destroy

func (dp *DubboProtocol) Destroy()

Destroy destroy dubbo service.

func (*DubboProtocol) Export

func (dp *DubboProtocol) Export(invoker protocol.Invoker) protocol.Exporter

Export export dubbo service.

func (*DubboProtocol) Refer

func (dp *DubboProtocol) Refer(url *common.URL) protocol.Invoker

Refer create dubbo service reference.

type SerialID

type SerialID byte

SerialID serial ID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL