dubbo2_to_http

package
v0.14.9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "dubbo2_to_http"
)

Variables

This section is empty.

Functions

func Create

func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

func Dubbo2ErrorResult

func Dubbo2ErrorResult(err error) protocol.RPCResult

func NewFactory

func NewFactory() eosc.IExtenderDriverFactory

func Register

func Register(register eosc.IExtenderDriverRegister)

Types

type Client

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

func NewClient

func NewClient(method string, body []byte, path string) *Client

type Complete

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

func NewComplete

func NewComplete(retry int, timeOut time.Duration, contentType string, path string, method string, params []param) *Complete

func (*Complete) Complete

func (c *Complete) Complete(org eocontext.EoContext) error

type Config

type Config struct {
	Method      string  `json:"method" label:"方法"  enum:"POST,GET,HEAD,PUT,PATCH,DELETE,CONNECT,OPTIONS,TRACE" required:"true"` //get/post
	Path        string  `json:"path" label:"转发路径" required:"true"`
	ContentType string  `json:"content_type" label:"ContentType" enum:"application/json" required:"true"` // application/json 只支持json格式传输
	Params      []Param `json:"params" label:"参数解析" required:"true"`
}

type Param

type Param struct {
	ClassName string `json:"class_name" label:"class_name" required:"true"` //对应Java中类的class_name
	FieldName string `json:"field_name" label:"字段名"`                        //用于http传输中body中的key名
}

type ToHttp

type ToHttp struct {
	drivers.WorkerBase
	// contains filtered or unexported fields
}

func (*ToHttp) CheckSkill

func (t *ToHttp) CheckSkill(skill string) bool

func (*ToHttp) Destroy

func (t *ToHttp) Destroy()

func (*ToHttp) DoDubboFilter

func (t *ToHttp) DoDubboFilter(ctx dubbo2_context.IDubbo2Context, next eocontext.IChain) (err error)

func (*ToHttp) DoFilter

func (t *ToHttp) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)

func (*ToHttp) Reset

func (t *ToHttp) Reset(v interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*ToHttp) Start

func (t *ToHttp) Start() error

func (*ToHttp) Stop

func (t *ToHttp) Stop() error

Jump to

Keyboard shortcuts

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