Documentation
¶
Index ¶
- func NewChain(list []ziface.IInterceptor, pos int, req ziface.IcReq) ziface.IChain
- func NewDelimiterBasedFrameDecoder(maxFrameLength int32, stripDelimiter, failFast bool, delimiters ...[]byte) ziface.IFrameDecoder
- func NewFrameDecoder(lf ziface.LengthField) ziface.IFrameDecoder
- func NewFrameDecoderByParams(maxFrameLength uint64, ...) ziface.IFrameDecoder
- func NewLineBasedFrameDecoder(maxLength int32, stripDelimiter, failFast bool) ziface.IFrameDecoder
- type Chain
- func (c *Chain) GetIMessage() ziface.IMessage
- func (c *Chain) Proceed(request ziface.IcReq) ziface.IcResp
- func (c *Chain) ProceedWithIMessage(iMessage ziface.IMessage, response ziface.IcReq) ziface.IcResp
- func (c *Chain) Request() ziface.IcReq
- func (c *Chain) ShouldIRequest(icReq ziface.IcReq) ziface.IRequest
- type DelimiterBasedFrameDecoder
- type FrameDecoder
- type LineBasedFrameDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDelimiterBasedFrameDecoder ¶ added in v1.1.31
func NewDelimiterBasedFrameDecoder(maxFrameLength int32, stripDelimiter, failFast bool, delimiters ...[]byte) ziface.IFrameDecoder
func NewFrameDecoder ¶
func NewFrameDecoder(lf ziface.LengthField) ziface.IFrameDecoder
func NewFrameDecoderByParams ¶
func NewFrameDecoderByParams(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int) ziface.IFrameDecoder
func NewLineBasedFrameDecoder ¶ added in v1.1.31
func NewLineBasedFrameDecoder(maxLength int32, stripDelimiter, failFast bool) ziface.IFrameDecoder
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) GetIMessage ¶ added in v1.1.17
GetIMessage 从Chain中获取IMessage
func (*Chain) ProceedWithIMessage ¶ added in v1.1.17
Next 通过IMessage和解码后数据进入下一个责任链任务 iMessage 为解码后的IMessage response 为解码后的数据
type DelimiterBasedFrameDecoder ¶ added in v1.1.31
type DelimiterBasedFrameDecoder struct {
// contains filtered or unexported fields
}
func (*DelimiterBasedFrameDecoder) Decode ¶ added in v1.1.31
func (this *DelimiterBasedFrameDecoder) Decode(buff []byte) [][]byte
type FrameDecoder ¶
type FrameDecoder struct {
ziface.LengthField //从ILengthField集成的基础属性
LengthFieldEndOffset int //长度字段结束位置的偏移量 LengthFieldOffset+LengthFieldLength
// contains filtered or unexported fields
}
FrameDecoder 基于LengthField模式的解码器
func (*FrameDecoder) Decode ¶
func (d *FrameDecoder) Decode(buff []byte) [][]byte
type LineBasedFrameDecoder ¶ added in v1.1.31
type LineBasedFrameDecoder struct {
// contains filtered or unexported fields
}
LineBasedFrameDecoder https://blog.csdn.net/h_sn9999/article/details/106492570
func (LineBasedFrameDecoder) Decode ¶ added in v1.1.31
func (l LineBasedFrameDecoder) Decode(buff []byte) [][]byte
Click to show internal directories.
Click to hide internal directories.