package customtransport
import "github.com/uber-go/tally/m3/customtransports"
Index ¶
- type TBufferedReadTransport
- func NewTBufferedReadTransport(readBuf *bytes.Buffer) (*TBufferedReadTransport, error)
- func (p *TBufferedReadTransport) Close() error
- func (p *TBufferedReadTransport) Flush() error
- func (p *TBufferedReadTransport) IsOpen() bool
- func (p *TBufferedReadTransport) Open() error
- func (p *TBufferedReadTransport) Read(buf []byte) (int, error)
- func (p *TBufferedReadTransport) RemainingBytes() uint64
- func (p *TBufferedReadTransport) Write(buf []byte) (int, error)
- type TCalcTransport
- func (p *TCalcTransport) Close() error
- func (p *TCalcTransport) Flush() error
- func (p *TCalcTransport) GetCount() int32
- func (p *TCalcTransport) IsOpen() bool
- func (p *TCalcTransport) Open() error
- func (p *TCalcTransport) Read(buf []byte) (int, error)
- func (p *TCalcTransport) ReadByte() (byte, error)
- func (p *TCalcTransport) RemainingBytes() uint64
- func (p *TCalcTransport) ResetCount()
- func (p *TCalcTransport) Write(buf []byte) (int, error)
- func (p *TCalcTransport) WriteByte(byte) error
- func (p *TCalcTransport) WriteString(s string) (int, error)
Types ¶
type TBufferedReadTransport ¶
type TBufferedReadTransport struct {
// contains filtered or unexported fields
}
TBufferedReadTransport is a thrift.TTransport that reads from a buffer
func NewTBufferedReadTransport ¶
func NewTBufferedReadTransport(readBuf *bytes.Buffer) (*TBufferedReadTransport, error)
NewTBufferedReadTransport creates a buffer backed TTransport
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 reads bytes from the local buffer and puts them in the specified buf
func (*TBufferedReadTransport) RemainingBytes ¶
func (p *TBufferedReadTransport) RemainingBytes() uint64
RemainingBytes returns the number of bytes left to be read from the readBuf
func (*TBufferedReadTransport) Write ¶
func (p *TBufferedReadTransport) Write(buf []byte) (int, error)
Write writes bytes into the read buffer Required to maintain thrift.TTransport interface
type TCalcTransport ¶
type TCalcTransport struct {
// contains filtered or unexported fields
}
TCalcTransport is a thrift TTransport that is used to calculate how many bytes are used when writing a thrift element.
func (*TCalcTransport) Close ¶
func (p *TCalcTransport) Close() error
Close does nothing as transport is not maintaining a connection Required to maintain thrift.TTransport interface
func (*TCalcTransport) Flush ¶
func (p *TCalcTransport) Flush() error
Flush does nothing as it's not required for calculations Required to maintain thrift.TTransport interface
func (*TCalcTransport) GetCount ¶
func (p *TCalcTransport) GetCount() int32
GetCount returns the number of bytes that would be written Required to maintain thrift.TTransport interface
func (*TCalcTransport) IsOpen ¶
func (p *TCalcTransport) IsOpen() bool
IsOpen does nothing as transport is not maintaining a connection Required to maintain thrift.TTransport interface
func (*TCalcTransport) Open ¶
func (p *TCalcTransport) Open() error
Open does nothing as transport is not maintaining a connection Required to maintain thrift.TTransport interface
func (*TCalcTransport) Read ¶
func (p *TCalcTransport) Read(buf []byte) (int, error)
Read does nothing as it's not required for calculations Required to maintain thrift.TTransport interface
func (*TCalcTransport) ReadByte ¶
func (p *TCalcTransport) ReadByte() (byte, error)
ReadByte does nothing as it's not required for calculations Required to maintain thrift.TRichTransport interface
func (*TCalcTransport) RemainingBytes ¶
func (p *TCalcTransport) RemainingBytes() uint64
RemainingBytes returns the max number of bytes (same as Thrift's StreamTransport) as we do not know how many bytes we have left.
func (*TCalcTransport) ResetCount ¶
func (p *TCalcTransport) ResetCount()
ResetCount resets the number of bytes written to 0
func (*TCalcTransport) Write ¶
func (p *TCalcTransport) Write(buf []byte) (int, error)
Write adds the number of bytes written to the count Required to maintain thrift.TTransport interface
func (*TCalcTransport) WriteByte ¶
func (p *TCalcTransport) WriteByte(byte) error
WriteByte adds 1 to the count Required to maintain thrift.TRichTransport interface
func (*TCalcTransport) WriteString ¶
func (p *TCalcTransport) WriteString(s string) (int, error)
WriteString adds the length of the string to the count Required to maintain thrift.TRichTransport interface
Source Files ¶
buffered_read_transport.go m3_calc_transport.go
- Version
- v3.5.10+incompatible (latest)
- Published
- Mar 6, 2024
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 months ago –
Tools for package owners.