tally: github.com/uber-go/tally/m3/customtransports Index | Files

package customtransport

import "github.com/uber-go/tally/m3/customtransports"

Index

Package Files

buffered_read_transport.go m3_calc_transport.go

type TBufferedReadTransport Uses

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

TBufferedReadTransport is a thrift.TTransport that reads from a buffer

func NewTBufferedReadTransport Uses

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

NewTBufferedReadTransport creates a buffer backed TTransport

func (*TBufferedReadTransport) Close Uses

func (p *TBufferedReadTransport) Close() error

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

func (*TBufferedReadTransport) Flush Uses

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 Uses

func (p *TBufferedReadTransport) IsOpen() bool

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

func (*TBufferedReadTransport) Open Uses

func (p *TBufferedReadTransport) Open() error

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

func (*TBufferedReadTransport) Read Uses

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 Uses

func (p *TBufferedReadTransport) RemainingBytes() uint64

RemainingBytes returns the number of bytes left to be read from the readBuf

func (*TBufferedReadTransport) Write Uses

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

Write writes bytes into the read buffer Required to maintain thrift.TTransport interface

type TCalcTransport Uses

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. It is thread-safe

func (*TCalcTransport) Close Uses

func (p *TCalcTransport) Close() error

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

func (*TCalcTransport) Flush Uses

func (p *TCalcTransport) Flush() error

Flush does nothing as it's not required for calculations Required to maintain thrift.TTransport interface

func (*TCalcTransport) GetCount Uses

func (p *TCalcTransport) GetCount() int32

GetCount returns the number of bytes that would be written Required to maintain thrift.TTransport interface

func (*TCalcTransport) IsOpen Uses

func (p *TCalcTransport) IsOpen() bool

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

func (*TCalcTransport) Open Uses

func (p *TCalcTransport) Open() error

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

func (*TCalcTransport) Read Uses

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) RemainingBytes Uses

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 Uses

func (p *TCalcTransport) ResetCount()

ResetCount resets the number of bytes written to 0

func (*TCalcTransport) Write Uses

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

Write adds the number of bytes written to the count Required to maintain thrift.TTransport interface

Package customtransport imports 3 packages (graph) and is imported by 3 packages. Updated 2019-08-12. Refresh now. Tools for package owners.