customtransport

package
v0.0.0-...-132f1c2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TBufferedReadTransport

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

TBufferedReadTransport是一个用于读取网络数据的bytes.Buffer

func NewTBufferedReadTransport

func NewTBufferedReadTransport(readBuf *bytes.Buffer) (*TBufferedReadTransport, error)

NewTBufferedReadTransport方法用于创建一个TBufferedReadTransport实例,存储网络传输内存数据, 这个应该是用来存储本地host上的微服务发送的trace网络数据

func (*TBufferedReadTransport) Close

func (p *TBufferedReadTransport) Close() error

Close does nothing as transport is not maintaining the connection Required to maintain thrift.TTransport interface

func (*TBufferedReadTransport) Flush

func (p *TBufferedReadTransport) Flush() error

Flush does nothing as udp server does not write responses back Required to maintain thrift.TTransport interface

func (*TBufferedReadTransport) IsOpen

func (p *TBufferedReadTransport) IsOpen() bool

IsOpen does nothing as transport is not maintaining the connection Required to maintain thrift.TTransport interface

func (*TBufferedReadTransport) Open

func (p *TBufferedReadTransport) Open() error

Open does nothing as transport is not maintaining the connection Required to maintain thrift.TTransport interface

func (*TBufferedReadTransport) Read

func (p *TBufferedReadTransport) Read(buf []byte) (int, error)

Read方法用于读取长度为len(buf)的数据存储到buf中

func (*TBufferedReadTransport) RemainingBytes

func (p *TBufferedReadTransport) RemainingBytes() uint64

RemainingBytes方法用于返回剩余可读内存数据长度

func (*TBufferedReadTransport) Write

func (p *TBufferedReadTransport) Write(buf []byte) (int, error)

Write方法命名并不好,它其实是重新指定一块内存区域

Write方法字面理解应该是追加数据

Jump to

Keyboard shortcuts

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