dubboproxy

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProxyTag = "mesherproxy"
)

Variables

View Source
var DubboListenAddr string

DubboListenAddr is a variable of type string used for storing listen address

View Source
var IsProvider bool

IsProvider is variable of type boolean used for tag proxyed dubbo service as provider(true) or consumer(false)

Functions

func ConvertDubboReqToHTTPReq

func ConvertDubboReqToHTTPReq(ctx *dubbo.InvokeContext, dubboReq *dubbo.Request) *http.Request

ConvertDubboReqToHTTPReq is a method which converts dubbo requesto to http request

func ConvertDubboRspToRestRsp

func ConvertDubboRspToRestRsp(dubboRsp *dubbo.DubboRsp, w http.ResponseWriter, ctx *dubbo.InvokeContext) error

ConvertDubboRspToRestRsp is a function which converts dubbo response to rest response

func ConvertHTTPReqToDubboReq

func ConvertHTTPReqToDubboReq(restReq *http.Request, ctx *dubbo.InvokeContext, inv *invocation.Invocation) error

ConvertHTTPReqToDubboReq is a function which converts http request in to dubbo request

func ConvertRestRspToDubboRsp

func ConvertRestRspToDubboRsp(ctx *dubbo.InvokeContext, resp *http.Response, dubboRsp *dubbo.DubboRsp)

ConvertRestRspToDubboRsp is a function which converts rest response to dubbo response

func Handle

func Handle(ctx *dubbo.InvokeContext) error

Handle is a function

func ProxyRestHandler

func ProxyRestHandler(ctx *dubbo.InvokeContext) error

ProxyRestHandler is a function

func SetLocalServiceAddress

func SetLocalServiceAddress(inv *invocation.Invocation) error

SetLocalServiceAddress assign invocation endpoint a local service address it uses config in cmd or env fi if it is empty, then try to use original port from client as local port

func TransparentForwardHandler

func TransparentForwardHandler(w http.ResponseWriter, r *http.Request)

TransparentForwardHandler is a function

Types

type ProxyError

type ProxyError struct {
	Message string
}

ProxyError is a struct

func (ProxyError) Error

func (e ProxyError) Error() string

Error is a method which returns error

Jump to

Keyboard shortcuts

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