grpc

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: Apache-2.0 Imports: 15 Imported by: 18

Documentation

Index

Constants

View Source
const GRPC = "grpc"

Variables

View Source
var ErrNoReply = errors.New("request need @response")

Functions

func GetProtocol

func GetProtocol() protocol.Protocol

Types

type Client

type Client struct {
	*grpc.ClientConn
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url common.URL) *Client

type DubboGrpcService

type DubboGrpcService interface {
	SetProxyImpl(impl protocol.Invoker)
	GetProxyImpl() protocol.Invoker
	ServiceDesc() *grpc.ServiceDesc
}

type GrpcExporter

type GrpcExporter struct {
	*protocol.BaseExporter
}

func NewGrpcExporter

func NewGrpcExporter(key string, invoker protocol.Invoker, exporterMap *sync.Map) *GrpcExporter

func (*GrpcExporter) Unexport

func (gg *GrpcExporter) Unexport()

type GrpcInvoker

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

func NewGrpcInvoker

func NewGrpcInvoker(url common.URL, client *Client) *GrpcInvoker

func (*GrpcInvoker) Destroy

func (gi *GrpcInvoker) Destroy()

func (*GrpcInvoker) Invoke

func (gi *GrpcInvoker) Invoke(invocation protocol.Invocation) protocol.Result

func (*GrpcInvoker) IsAvailable

func (gi *GrpcInvoker) IsAvailable() bool

func (*GrpcInvoker) IsDestroyed

func (gi *GrpcInvoker) IsDestroyed() bool

type GrpcProtocol

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

func NewGRPCProtocol

func NewGRPCProtocol() *GrpcProtocol

func (*GrpcProtocol) Destroy

func (gp *GrpcProtocol) Destroy()

func (*GrpcProtocol) Export

func (gp *GrpcProtocol) Export(invoker protocol.Invoker) protocol.Exporter

func (*GrpcProtocol) Refer

func (gp *GrpcProtocol) Refer(url common.URL) protocol.Invoker

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Start

func (s *Server) Start(url common.URL)

func (*Server) Stop

func (s *Server) Stop()

Directories

Path Synopsis
just for test, never use internal for production.
just for test, never use internal for production.
plugin/dubbo
dubbo plugin for protobuf.
dubbo plugin for protobuf.

Jump to

Keyboard shortcuts

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