Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericCodec ¶
type GenericCodec struct {
// contains filtered or unexported fields
}
GenericCodec is pb impl of TwoWayCodec
func (*GenericCodec) UnmarshalRequest ¶
func (h *GenericCodec) UnmarshalRequest(data []byte) ([]interface{}, error)
UnmarshalRequest unmarshal bytes @data to interface
type TripleClient ¶
type TripleClient struct {
// contains filtered or unexported fields
}
TripleClient client endpoint that using triple protocol
func NewTripleClient ¶
func NewTripleClient(impl interface{}, opt *config.Option) (*TripleClient, error)
NewTripleClient creates triple client it returns tripleClient, which contains invoker and triple connection. @impl must have method: GetDubboStub(cc *dubbo3.TripleConn) interface{}, to be capable with grpc @opt is used to init http2 controller, if it's nil, use the default config
func (*TripleClient) Close ¶
func (t *TripleClient) Close()
Close destroy http controller and return
func (*TripleClient) Invoke ¶
func (t *TripleClient) Invoke(methodName string, in []reflect.Value, reply interface{}) common.ErrorWithAttachment
Invoke call remote using stub
func (*TripleClient) IsAvailable ¶
func (t *TripleClient) IsAvailable() bool
IsAvailable returns if triple client is available
type TripleConn ¶
type TripleConn struct {
// contains filtered or unexported fields
}
TripleConn is the struct that called in pb.go file Its client field contains all net logic of dubbo3
func (*TripleConn) Invoke ¶
func (t *TripleConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) common.ErrorWithAttachment
Invoke called by unary rpc 's pb.go file in dubbo-go 3.0 design @method is /interfaceKey/functionName e.g. /com.apache.dubbo.sample.basic.IGreeter/BigUnaryTest @arg is request body, must be proto.Message type
type TripleServer ¶
type TripleServer struct {
// contains filtered or unexported fields
}
TripleServer is the object that can be started and listening remote request
func NewTripleServer ¶
func NewTripleServer(serviceMap *sync.Map, opt *config.Option) *TripleServer
NewTripleServer can create Server with url and some user impl providers stored in @serviceMap @serviceMap should be sync.Map: "interfaceKey" -> Dubbo3GrpcService
func (*TripleServer) RefreshService ¶
func (t *TripleServer) RefreshService()