dubbo2_context

package
v1.15.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FilterSkillName = config.TypeNameOf((*DubboFilter)(nil))
)

Functions

func DoDubboFilter

func DoDubboFilter(httpFilter DubboFilter, ctx eocontext.EoContext, next eocontext.IChain) (err error)

Types

type Dubbo2ParamBody

type Dubbo2ParamBody struct {
	TypesList  []string
	ValuesList []interface{}
}

type DubboFilter

type DubboFilter interface {
	DoDubboFilter(ctx IDubbo2Context, next eocontext.IChain) (err error)
}

type IDubbo2Context

type IDubbo2Context interface {
	eocontext.EoContext
	HeaderReader() IRequestReader // 读取原始请求
	Proxy() IProxy                // 读写转发请求
	Response() IResponse          // 处理返回结果,可读可写
	Invoke(no eocontext.INode, timeout time.Duration) error
}

func Assert

func Assert(ctx eocontext.EoContext) (IDubbo2Context, error)

type IProxy

type IProxy interface {
	Service() IServiceWriter
	SetParam(*Dubbo2ParamBody)
	GetParam() *Dubbo2ParamBody
	SetAttachment(string, interface{})
	Attachments() map[string]interface{}
}

type IRequestReader

type IRequestReader interface {
	Service() IServiceReader
	Body() interface{}
	Host() string
	Attachments() map[string]interface{}
	Attachment(string) (interface{}, bool)
	RemoteIP() string
}

type IResponse

type IResponse interface {
	ResponseError() error
	SetResponseTime(duration time.Duration)
	ResponseTime() time.Duration
	GetBody() interface{}
	SetBody(interface{})
}

type IServiceReader

type IServiceReader interface {
	Path() string
	Interface() string
	Group() string
	Version() string
	Method() string
}

type IServiceWriter

type IServiceWriter interface {
	IServiceReader
	SetPath(string)
	SetInterface(string)
	SetGroup(string)
	SetVersion(string)
	SetMethod(string)
}

Jump to

Keyboard shortcuts

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