tally: github.com/uber-go/tally/thirdparty/github.com/apache/thrift/lib/go/thrift Index | Files

package thrift

import "github.com/uber-go/tally/thirdparty/github.com/apache/thrift/lib/go/thrift"

Index

Package Files

application_exception.go binary_protocol.go buffered_transport.go compact_protocol.go debug_protocol.go deserializer.go exception.go field.go framed_transport.go http_client.go http_transport.go iostream_transport.go json_protocol.go memory_buffer.go messagetype.go multiplexed_protocol.go numeric.go pointerize.go processor.go processor_factory.go protocol.go protocol_exception.go protocol_factory.go rich_transport.go serializer.go server.go server_socket.go server_transport.go simple_json_protocol.go simple_server.go socket.go ssl_server_socket.go ssl_socket.go transport.go transport_exception.go transport_factory.go type.go zlib_transport.go

Constants

const (
    UNKNOWN_APPLICATION_EXCEPTION  = 0
    UNKNOWN_METHOD                 = 1
    INVALID_MESSAGE_TYPE_EXCEPTION = 2
    WRONG_METHOD_NAME              = 3
    BAD_SEQUENCE_ID                = 4
    MISSING_RESULT                 = 5
    INTERNAL_ERROR                 = 6
    PROTOCOL_ERROR                 = 7
)
const (
    COMPACT_PROTOCOL_ID       = 0x082
    COMPACT_VERSION           = 1
    COMPACT_VERSION_MASK      = 0x1f
    COMPACT_TYPE_MASK         = 0x0E0
    COMPACT_TYPE_BITS         = 0x07
    COMPACT_TYPE_SHIFT_AMOUNT = 5
)
const (
    COMPACT_BOOLEAN_TRUE  = 0x01
    COMPACT_BOOLEAN_FALSE = 0x02
    COMPACT_BYTE          = 0x03
    COMPACT_I16           = 0x04
    COMPACT_I32           = 0x05
    COMPACT_I64           = 0x06
    COMPACT_DOUBLE        = 0x07
    COMPACT_BINARY        = 0x08
    COMPACT_LIST          = 0x09
    COMPACT_SET           = 0x0A
    COMPACT_MAP           = 0x0B
    COMPACT_STRUCT        = 0x0C
)
const (
    VERSION_MASK = 0xffff0000
    VERSION_1    = 0x80010000
)
const (
    UNKNOWN_PROTOCOL_EXCEPTION = 0
    INVALID_DATA               = 1
    NEGATIVE_SIZE              = 2
    SIZE_LIMIT                 = 3
    BAD_VERSION                = 4
    NOT_IMPLEMENTED            = 5
    DEPTH_LIMIT                = 6
)
const (
    UNKNOWN_TRANSPORT_EXCEPTION = 0
    NOT_OPEN                    = 1
    ALREADY_OPEN                = 2
    TIMED_OUT                   = 3
    END_OF_FILE                 = 4
)
const (
    STOP   = 0
    VOID   = 1
    BOOL   = 2
    BYTE   = 3
    I08    = 3
    DOUBLE = 4
    I16    = 6
    I32    = 8
    I64    = 10
    STRING = 11
    UTF7   = 11
    STRUCT = 12
    MAP    = 13
    SET    = 14
    LIST   = 15
    UTF8   = 16
    UTF16  = 17
)
const DEFAULT_MAX_LENGTH = 16384000
const DEFAULT_RECURSION_DEPTH = 64

The maximum recursive depth the skip() function will traverse

const MULTIPLEXED_SEPARATOR = ":"
const (
    THRIFT_JSON_PROTOCOL_VERSION = 1
)

Variables

var (
    JSON_COMMA                   []byte
    JSON_COLON                   []byte
    JSON_LBRACE                  []byte
    JSON_RBRACE                  []byte
    JSON_LBRACKET                []byte
    JSON_RBRACKET                []byte
    JSON_QUOTE                   byte
    JSON_QUOTE_BYTES             []byte
    JSON_NULL                    []byte
    JSON_TRUE                    []byte
    JSON_FALSE                   []byte
    JSON_INFINITY                string
    JSON_NEGATIVE_INFINITY       string
    JSON_NAN                     string
    JSON_INFINITY_BYTES          []byte
    JSON_NEGATIVE_INFINITY_BYTES []byte
    JSON_NAN_BYTES               []byte
)
var ANONYMOUS_FIELD *field
var DefaultHttpClient *http.Client = http.DefaultClient

Default to using the shared http client. Library users are free to change this global client or specify one through THttpClientOptions.

func BoolPtr Uses

func BoolPtr(v bool) *bool

func ByteSlicePtr Uses

func ByteSlicePtr(v []byte) *[]byte

func Float32Ptr Uses

func Float32Ptr(v float32) *float32

func Float64Ptr Uses

func Float64Ptr(v float64) *float64

func Int32Ptr Uses

func Int32Ptr(v int32) *int32

func Int64Ptr Uses

func Int64Ptr(v int64) *int64

func IntPtr Uses

func IntPtr(v int) *int

func NewStoredMessageProtocol Uses

func NewStoredMessageProtocol(protocol TProtocol, name string, typeId TMessageType, seqid int32) *storedMessageProtocol

func NewThriftHandlerFunc Uses

func NewThriftHandlerFunc(processor TProcessor,
    inPfactory, outPfactory TProtocolFactory) func(w http.ResponseWriter, r *http.Request)

NewThriftHandlerFunc is a function that create a ready to use Apache Thrift Handler function

func PrependError Uses

func PrependError(prepend string, err error) error

Prepends additional information to an error without losing the Thrift exception interface

func Skip Uses

func Skip(self TProtocol, fieldType TType, maxDepth int) (err error)

Skips over the next data element from the provided input TProtocol object.

func SkipDefaultDepth Uses

func SkipDefaultDepth(prot TProtocol, typeId TType) (err error)

Skips over the next data element from the provided input TProtocol object.

func StringPtr Uses

func StringPtr(v string) *string

func Uint32Ptr Uses

func Uint32Ptr(v uint32) *uint32

func Uint64Ptr Uses

func Uint64Ptr(v uint64) *uint64

type Flusher Uses

type Flusher interface {
    Flush() (err error)
}

type Numeric Uses

type Numeric interface {
    Int64() int64
    Int32() int32
    Int16() int16
    Byte() byte
    Int() int
    Float64() float64
    Float32() float32
    String() string
    // contains filtered or unexported methods
}
var (
    INFINITY          Numeric
    NEGATIVE_INFINITY Numeric
    NAN               Numeric
    ZERO              Numeric
    NUMERIC_NULL      Numeric
)

func NewNullNumeric Uses

func NewNullNumeric() Numeric

func NewNumericFromDouble Uses

func NewNumericFromDouble(dValue float64) Numeric

func NewNumericFromI32 Uses

func NewNumericFromI32(iValue int32) Numeric

func NewNumericFromI64 Uses

func NewNumericFromI64(iValue int64) Numeric

func NewNumericFromJSONString Uses

func NewNumericFromJSONString(sValue string, isNull bool) Numeric

func NewNumericFromString Uses

func NewNumericFromString(sValue string) Numeric

type ReadSizeProvider Uses

type ReadSizeProvider interface {
    RemainingBytes() (num_bytes uint64)
}

type RichTransport Uses

type RichTransport struct {
    TTransport
}

func NewTRichTransport Uses

func NewTRichTransport(trans TTransport) *RichTransport

Wraps Transport to provide TRichTransport interface

func (*RichTransport) ReadByte Uses

func (r *RichTransport) ReadByte() (c byte, err error)

func (*RichTransport) RemainingBytes Uses

func (r *RichTransport) RemainingBytes() (num_bytes uint64)

func (*RichTransport) WriteByte Uses

func (r *RichTransport) WriteByte(c byte) error

func (*RichTransport) WriteString Uses

func (r *RichTransport) WriteString(s string) (n int, err error)

type StreamTransport Uses

type StreamTransport struct {
    io.Reader
    io.Writer
    // contains filtered or unexported fields
}

StreamTransport is a Transport made of an io.Reader and/or an io.Writer

func NewStreamTransport Uses

func NewStreamTransport(r io.Reader, w io.Writer) *StreamTransport

func NewStreamTransportR Uses

func NewStreamTransportR(r io.Reader) *StreamTransport

func NewStreamTransportRW Uses

func NewStreamTransportRW(rw io.ReadWriter) *StreamTransport

func NewStreamTransportW Uses

func NewStreamTransportW(w io.Writer) *StreamTransport

func (*StreamTransport) Close Uses

func (p *StreamTransport) Close() error

Closes both the input and output streams.

func (*StreamTransport) Flush Uses

func (p *StreamTransport) Flush() error

Flushes the underlying output stream if not null.

func (*StreamTransport) IsOpen Uses

func (p *StreamTransport) IsOpen() bool

func (*StreamTransport) Open Uses

func (p *StreamTransport) Open() error

implicitly opened on creation, can't be reopened once closed

func (*StreamTransport) Read Uses

func (p *StreamTransport) Read(c []byte) (n int, err error)

func (*StreamTransport) ReadByte Uses

func (p *StreamTransport) ReadByte() (c byte, err error)

func (*StreamTransport) RemainingBytes Uses

func (p *StreamTransport) RemainingBytes() (num_bytes uint64)

func (*StreamTransport) Write Uses

func (p *StreamTransport) Write(c []byte) (n int, err error)

func (*StreamTransport) WriteByte Uses

func (p *StreamTransport) WriteByte(c byte) (err error)

func (*StreamTransport) WriteString Uses

func (p *StreamTransport) WriteString(s string) (n int, err error)

type StreamTransportFactory Uses

type StreamTransportFactory struct {
    Reader io.Reader
    Writer io.Writer
    // contains filtered or unexported fields
}

func NewStreamTransportFactory Uses

func NewStreamTransportFactory(reader io.Reader, writer io.Writer, isReadWriter bool) *StreamTransportFactory

func (*StreamTransportFactory) GetTransport Uses

func (p *StreamTransportFactory) GetTransport(trans TTransport) TTransport

type TApplicationException Uses

type TApplicationException interface {
    TException
    TypeId() int32
    Read(iprot TProtocol) (TApplicationException, error)
    Write(oprot TProtocol) error
}

Application level Thrift exception

func NewTApplicationException Uses

func NewTApplicationException(type_ int32, message string) TApplicationException

type TBinaryProtocol Uses

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

func NewTBinaryProtocol Uses

func NewTBinaryProtocol(t TTransport, strictRead, strictWrite bool) *TBinaryProtocol

func NewTBinaryProtocolTransport Uses

func NewTBinaryProtocolTransport(t TTransport) *TBinaryProtocol

func (*TBinaryProtocol) Flush Uses

func (p *TBinaryProtocol) Flush() (err error)

func (*TBinaryProtocol) ReadBinary Uses

func (p *TBinaryProtocol) ReadBinary() ([]byte, error)

func (*TBinaryProtocol) ReadBool Uses

func (p *TBinaryProtocol) ReadBool() (bool, error)

func (*TBinaryProtocol) ReadByte Uses

func (p *TBinaryProtocol) ReadByte() (int8, error)

func (*TBinaryProtocol) ReadDouble Uses

func (p *TBinaryProtocol) ReadDouble() (value float64, err error)

func (*TBinaryProtocol) ReadFieldBegin Uses

func (p *TBinaryProtocol) ReadFieldBegin() (name string, typeId TType, seqId int16, err error)

func (*TBinaryProtocol) ReadFieldEnd Uses

func (p *TBinaryProtocol) ReadFieldEnd() error

func (*TBinaryProtocol) ReadI16 Uses

func (p *TBinaryProtocol) ReadI16() (value int16, err error)

func (*TBinaryProtocol) ReadI32 Uses

func (p *TBinaryProtocol) ReadI32() (value int32, err error)

func (*TBinaryProtocol) ReadI64 Uses

func (p *TBinaryProtocol) ReadI64() (value int64, err error)

func (*TBinaryProtocol) ReadListBegin Uses

func (p *TBinaryProtocol) ReadListBegin() (elemType TType, size int, err error)

func (*TBinaryProtocol) ReadListEnd Uses

func (p *TBinaryProtocol) ReadListEnd() error

func (*TBinaryProtocol) ReadMapBegin Uses

func (p *TBinaryProtocol) ReadMapBegin() (kType, vType TType, size int, err error)

func (*TBinaryProtocol) ReadMapEnd Uses

func (p *TBinaryProtocol) ReadMapEnd() error

func (*TBinaryProtocol) ReadMessageBegin Uses

func (p *TBinaryProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)

func (*TBinaryProtocol) ReadMessageEnd Uses

func (p *TBinaryProtocol) ReadMessageEnd() error

func (*TBinaryProtocol) ReadSetBegin Uses

func (p *TBinaryProtocol) ReadSetBegin() (elemType TType, size int, err error)

func (*TBinaryProtocol) ReadSetEnd Uses

func (p *TBinaryProtocol) ReadSetEnd() error

func (*TBinaryProtocol) ReadString Uses

func (p *TBinaryProtocol) ReadString() (value string, err error)

func (*TBinaryProtocol) ReadStructBegin Uses

func (p *TBinaryProtocol) ReadStructBegin() (name string, err error)

func (*TBinaryProtocol) ReadStructEnd Uses

func (p *TBinaryProtocol) ReadStructEnd() error

func (*TBinaryProtocol) Skip Uses

func (p *TBinaryProtocol) Skip(fieldType TType) (err error)

func (*TBinaryProtocol) Transport Uses

func (p *TBinaryProtocol) Transport() TTransport

func (*TBinaryProtocol) WriteBinary Uses

func (p *TBinaryProtocol) WriteBinary(value []byte) error

func (*TBinaryProtocol) WriteBool Uses

func (p *TBinaryProtocol) WriteBool(value bool) error

func (*TBinaryProtocol) WriteByte Uses

func (p *TBinaryProtocol) WriteByte(value int8) error

func (*TBinaryProtocol) WriteDouble Uses

func (p *TBinaryProtocol) WriteDouble(value float64) error

func (*TBinaryProtocol) WriteFieldBegin Uses

func (p *TBinaryProtocol) WriteFieldBegin(name string, typeId TType, id int16) error

func (*TBinaryProtocol) WriteFieldEnd Uses

func (p *TBinaryProtocol) WriteFieldEnd() error

func (*TBinaryProtocol) WriteFieldStop Uses

func (p *TBinaryProtocol) WriteFieldStop() error

func (*TBinaryProtocol) WriteI16 Uses

func (p *TBinaryProtocol) WriteI16(value int16) error

func (*TBinaryProtocol) WriteI32 Uses

func (p *TBinaryProtocol) WriteI32(value int32) error

func (*TBinaryProtocol) WriteI64 Uses

func (p *TBinaryProtocol) WriteI64(value int64) error

func (*TBinaryProtocol) WriteListBegin Uses

func (p *TBinaryProtocol) WriteListBegin(elemType TType, size int) error

func (*TBinaryProtocol) WriteListEnd Uses

func (p *TBinaryProtocol) WriteListEnd() error

func (*TBinaryProtocol) WriteMapBegin Uses

func (p *TBinaryProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error

func (*TBinaryProtocol) WriteMapEnd Uses

func (p *TBinaryProtocol) WriteMapEnd() error

func (*TBinaryProtocol) WriteMessageBegin Uses

func (p *TBinaryProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error

func (*TBinaryProtocol) WriteMessageEnd Uses

func (p *TBinaryProtocol) WriteMessageEnd() error

func (*TBinaryProtocol) WriteSetBegin Uses

func (p *TBinaryProtocol) WriteSetBegin(elemType TType, size int) error

func (*TBinaryProtocol) WriteSetEnd Uses

func (p *TBinaryProtocol) WriteSetEnd() error

func (*TBinaryProtocol) WriteString Uses

func (p *TBinaryProtocol) WriteString(value string) error

func (*TBinaryProtocol) WriteStructBegin Uses

func (p *TBinaryProtocol) WriteStructBegin(name string) error

func (*TBinaryProtocol) WriteStructEnd Uses

func (p *TBinaryProtocol) WriteStructEnd() error

type TBinaryProtocolFactory Uses

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

func NewTBinaryProtocolFactory Uses

func NewTBinaryProtocolFactory(strictRead, strictWrite bool) *TBinaryProtocolFactory

func NewTBinaryProtocolFactoryDefault Uses

func NewTBinaryProtocolFactoryDefault() *TBinaryProtocolFactory

func (*TBinaryProtocolFactory) GetProtocol Uses

func (p *TBinaryProtocolFactory) GetProtocol(t TTransport) TProtocol

type TBufferedTransport Uses

type TBufferedTransport struct {
    bufio.ReadWriter
    // contains filtered or unexported fields
}

func NewTBufferedTransport Uses

func NewTBufferedTransport(trans TTransport, bufferSize int) *TBufferedTransport

func (*TBufferedTransport) Close Uses

func (p *TBufferedTransport) Close() (err error)

func (*TBufferedTransport) Flush Uses

func (p *TBufferedTransport) Flush() error

func (*TBufferedTransport) IsOpen Uses

func (p *TBufferedTransport) IsOpen() bool

func (*TBufferedTransport) Open Uses

func (p *TBufferedTransport) Open() (err error)

func (*TBufferedTransport) Read Uses

func (p *TBufferedTransport) Read(b []byte) (int, error)

func (*TBufferedTransport) RemainingBytes Uses

func (p *TBufferedTransport) RemainingBytes() (num_bytes uint64)

func (*TBufferedTransport) Write Uses

func (p *TBufferedTransport) Write(b []byte) (int, error)

type TBufferedTransportFactory Uses

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

func NewTBufferedTransportFactory Uses

func NewTBufferedTransportFactory(bufferSize int) *TBufferedTransportFactory

func (*TBufferedTransportFactory) GetTransport Uses

func (p *TBufferedTransportFactory) GetTransport(trans TTransport) TTransport

type TCompactProtocol Uses

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

func NewTCompactProtocol Uses

func NewTCompactProtocol(trans TTransport) *TCompactProtocol

Create a TCompactProtocol given a TTransport

func (*TCompactProtocol) Flush Uses

func (p *TCompactProtocol) Flush() (err error)

func (*TCompactProtocol) ReadBinary Uses

func (p *TCompactProtocol) ReadBinary() (value []byte, err error)

Read a []byte from the wire.

func (*TCompactProtocol) ReadBool Uses

func (p *TCompactProtocol) ReadBool() (value bool, err error)

Read a boolean off the wire. If this is a boolean field, the value should already have been read during readFieldBegin, so we'll just consume the pre-stored value. Otherwise, read a byte.

func (*TCompactProtocol) ReadByte Uses

func (p *TCompactProtocol) ReadByte() (int8, error)

Read a single byte off the wire. Nothing interesting here.

func (*TCompactProtocol) ReadDouble Uses

func (p *TCompactProtocol) ReadDouble() (value float64, err error)

No magic here - just read a double off the wire.

func (*TCompactProtocol) ReadFieldBegin Uses

func (p *TCompactProtocol) ReadFieldBegin() (name string, typeId TType, id int16, err error)

Read a field header off the wire.

func (*TCompactProtocol) ReadFieldEnd Uses

func (p *TCompactProtocol) ReadFieldEnd() error

func (*TCompactProtocol) ReadI16 Uses

func (p *TCompactProtocol) ReadI16() (value int16, err error)

Read an i16 from the wire as a zigzag varint.

func (*TCompactProtocol) ReadI32 Uses

func (p *TCompactProtocol) ReadI32() (value int32, err error)

Read an i32 from the wire as a zigzag varint.

func (*TCompactProtocol) ReadI64 Uses

func (p *TCompactProtocol) ReadI64() (value int64, err error)

Read an i64 from the wire as a zigzag varint.

func (*TCompactProtocol) ReadListBegin Uses

func (p *TCompactProtocol) ReadListBegin() (elemType TType, size int, err error)

Read a list header off the wire. If the list size is 0-14, the size will be packed into the element type header. If it's a longer list, the 4 MSB of the element type header will be 0xF, and a varint will follow with the true size.

func (*TCompactProtocol) ReadListEnd Uses

func (p *TCompactProtocol) ReadListEnd() error

func (*TCompactProtocol) ReadMapBegin Uses

func (p *TCompactProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, err error)

Read a map header off the wire. If the size is zero, skip reading the key and value type. This means that 0-length maps will yield TMaps without the "correct" types.

func (*TCompactProtocol) ReadMapEnd Uses

func (p *TCompactProtocol) ReadMapEnd() error

func (*TCompactProtocol) ReadMessageBegin Uses

func (p *TCompactProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)

Read a message header.

func (*TCompactProtocol) ReadMessageEnd Uses

func (p *TCompactProtocol) ReadMessageEnd() error

func (*TCompactProtocol) ReadSetBegin Uses

func (p *TCompactProtocol) ReadSetBegin() (elemType TType, size int, err error)

Read a set header off the wire. If the set size is 0-14, the size will be packed into the element type header. If it's a longer set, the 4 MSB of the element type header will be 0xF, and a varint will follow with the true size.

func (*TCompactProtocol) ReadSetEnd Uses

func (p *TCompactProtocol) ReadSetEnd() error

func (*TCompactProtocol) ReadString Uses

func (p *TCompactProtocol) ReadString() (value string, err error)

Reads a []byte (via readBinary), and then UTF-8 decodes it.

func (*TCompactProtocol) ReadStructBegin Uses

func (p *TCompactProtocol) ReadStructBegin() (name string, err error)

Read a struct begin. There's nothing on the wire for this, but it is our opportunity to push a new struct begin marker onto the field stack.

func (*TCompactProtocol) ReadStructEnd Uses

func (p *TCompactProtocol) ReadStructEnd() error

Doesn't actually consume any wire data, just removes the last field for this struct from the field stack.

func (*TCompactProtocol) Skip Uses

func (p *TCompactProtocol) Skip(fieldType TType) (err error)

func (*TCompactProtocol) Transport Uses

func (p *TCompactProtocol) Transport() TTransport

func (*TCompactProtocol) WriteBinary Uses

func (p *TCompactProtocol) WriteBinary(bin []byte) error

Write a byte array, using a varint for the size.

func (*TCompactProtocol) WriteBool Uses

func (p *TCompactProtocol) WriteBool(value bool) error

func (*TCompactProtocol) WriteByte Uses

func (p *TCompactProtocol) WriteByte(value int8) error

Write a byte. Nothing to see here!

func (*TCompactProtocol) WriteDouble Uses

func (p *TCompactProtocol) WriteDouble(value float64) error

Write a double to the wire as 8 bytes.

func (*TCompactProtocol) WriteFieldBegin Uses

func (p *TCompactProtocol) WriteFieldBegin(name string, typeId TType, id int16) error

func (*TCompactProtocol) WriteFieldEnd Uses

func (p *TCompactProtocol) WriteFieldEnd() error

func (*TCompactProtocol) WriteFieldStop Uses

func (p *TCompactProtocol) WriteFieldStop() error

func (*TCompactProtocol) WriteI16 Uses

func (p *TCompactProtocol) WriteI16(value int16) error

Write an I16 as a zigzag varint.

func (*TCompactProtocol) WriteI32 Uses

func (p *TCompactProtocol) WriteI32(value int32) error

Write an i32 as a zigzag varint.

func (*TCompactProtocol) WriteI64 Uses

func (p *TCompactProtocol) WriteI64(value int64) error

Write an i64 as a zigzag varint.

func (*TCompactProtocol) WriteListBegin Uses

func (p *TCompactProtocol) WriteListBegin(elemType TType, size int) error

Write a list header.

func (*TCompactProtocol) WriteListEnd Uses

func (p *TCompactProtocol) WriteListEnd() error

func (*TCompactProtocol) WriteMapBegin Uses

func (p *TCompactProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error

func (*TCompactProtocol) WriteMapEnd Uses

func (p *TCompactProtocol) WriteMapEnd() error

func (*TCompactProtocol) WriteMessageBegin Uses

func (p *TCompactProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error

Write a message header to the wire. Compact Protocol messages contain the protocol version so we can migrate forwards in the future if need be.

func (*TCompactProtocol) WriteMessageEnd Uses

func (p *TCompactProtocol) WriteMessageEnd() error

func (*TCompactProtocol) WriteSetBegin Uses

func (p *TCompactProtocol) WriteSetBegin(elemType TType, size int) error

Write a set header.

func (*TCompactProtocol) WriteSetEnd Uses

func (p *TCompactProtocol) WriteSetEnd() error

func (*TCompactProtocol) WriteString Uses

func (p *TCompactProtocol) WriteString(value string) error

Write a string to the wire with a varint size preceding.

func (*TCompactProtocol) WriteStructBegin Uses

func (p *TCompactProtocol) WriteStructBegin(name string) error

Write a struct begin. This doesn't actually put anything on the wire. We use it as an opportunity to put special placeholder markers on the field stack so we can get the field id deltas correct.

func (*TCompactProtocol) WriteStructEnd Uses

func (p *TCompactProtocol) WriteStructEnd() error

Write a struct end. This doesn't actually put anything on the wire. We use this as an opportunity to pop the last field from the current struct off of the field stack.

type TCompactProtocolFactory Uses

type TCompactProtocolFactory struct{}

func NewTCompactProtocolFactory Uses

func NewTCompactProtocolFactory() *TCompactProtocolFactory

func (*TCompactProtocolFactory) GetProtocol Uses

func (p *TCompactProtocolFactory) GetProtocol(trans TTransport) TProtocol

type TDebugProtocol Uses

type TDebugProtocol struct {
    Delegate  TProtocol
    LogPrefix string
}

func (*TDebugProtocol) Flush Uses

func (tdp *TDebugProtocol) Flush() (err error)

func (*TDebugProtocol) ReadBinary Uses

func (tdp *TDebugProtocol) ReadBinary() (value []byte, err error)

func (*TDebugProtocol) ReadBool Uses

func (tdp *TDebugProtocol) ReadBool() (value bool, err error)

func (*TDebugProtocol) ReadByte Uses

func (tdp *TDebugProtocol) ReadByte() (value int8, err error)

func (*TDebugProtocol) ReadDouble Uses

func (tdp *TDebugProtocol) ReadDouble() (value float64, err error)

func (*TDebugProtocol) ReadFieldBegin Uses

func (tdp *TDebugProtocol) ReadFieldBegin() (name string, typeId TType, id int16, err error)

func (*TDebugProtocol) ReadFieldEnd Uses

func (tdp *TDebugProtocol) ReadFieldEnd() (err error)

func (*TDebugProtocol) ReadI16 Uses

func (tdp *TDebugProtocol) ReadI16() (value int16, err error)

func (*TDebugProtocol) ReadI32 Uses

func (tdp *TDebugProtocol) ReadI32() (value int32, err error)

func (*TDebugProtocol) ReadI64 Uses

func (tdp *TDebugProtocol) ReadI64() (value int64, err error)

func (*TDebugProtocol) ReadListBegin Uses

func (tdp *TDebugProtocol) ReadListBegin() (elemType TType, size int, err error)

func (*TDebugProtocol) ReadListEnd Uses

func (tdp *TDebugProtocol) ReadListEnd() (err error)

func (*TDebugProtocol) ReadMapBegin Uses

func (tdp *TDebugProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, err error)

func (*TDebugProtocol) ReadMapEnd Uses

func (tdp *TDebugProtocol) ReadMapEnd() (err error)

func (*TDebugProtocol) ReadMessageBegin Uses

func (tdp *TDebugProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqid int32, err error)

func (*TDebugProtocol) ReadMessageEnd Uses

func (tdp *TDebugProtocol) ReadMessageEnd() (err error)

func (*TDebugProtocol) ReadSetBegin Uses

func (tdp *TDebugProtocol) ReadSetBegin() (elemType TType, size int, err error)

func (*TDebugProtocol) ReadSetEnd Uses

func (tdp *TDebugProtocol) ReadSetEnd() (err error)

func (*TDebugProtocol) ReadString Uses

func (tdp *TDebugProtocol) ReadString() (value string, err error)

func (*TDebugProtocol) ReadStructBegin Uses

func (tdp *TDebugProtocol) ReadStructBegin() (name string, err error)

func (*TDebugProtocol) ReadStructEnd Uses

func (tdp *TDebugProtocol) ReadStructEnd() (err error)

func (*TDebugProtocol) Skip Uses

func (tdp *TDebugProtocol) Skip(fieldType TType) (err error)

func (*TDebugProtocol) Transport Uses

func (tdp *TDebugProtocol) Transport() TTransport

func (*TDebugProtocol) WriteBinary Uses

func (tdp *TDebugProtocol) WriteBinary(value []byte) error

func (*TDebugProtocol) WriteBool Uses

func (tdp *TDebugProtocol) WriteBool(value bool) error

func (*TDebugProtocol) WriteByte Uses

func (tdp *TDebugProtocol) WriteByte(value int8) error

func (*TDebugProtocol) WriteDouble Uses

func (tdp *TDebugProtocol) WriteDouble(value float64) error

func (*TDebugProtocol) WriteFieldBegin Uses

func (tdp *TDebugProtocol) WriteFieldBegin(name string, typeId TType, id int16) error

func (*TDebugProtocol) WriteFieldEnd Uses

func (tdp *TDebugProtocol) WriteFieldEnd() error

func (*TDebugProtocol) WriteFieldStop Uses

func (tdp *TDebugProtocol) WriteFieldStop() error

func (*TDebugProtocol) WriteI16 Uses

func (tdp *TDebugProtocol) WriteI16(value int16) error

func (*TDebugProtocol) WriteI32 Uses

func (tdp *TDebugProtocol) WriteI32(value int32) error

func (*TDebugProtocol) WriteI64 Uses

func (tdp *TDebugProtocol) WriteI64(value int64) error

func (*TDebugProtocol) WriteListBegin Uses

func (tdp *TDebugProtocol) WriteListBegin(elemType TType, size int) error

func (*TDebugProtocol) WriteListEnd Uses

func (tdp *TDebugProtocol) WriteListEnd() error

func (*TDebugProtocol) WriteMapBegin Uses

func (tdp *TDebugProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error

func (*TDebugProtocol) WriteMapEnd Uses

func (tdp *TDebugProtocol) WriteMapEnd() error

func (*TDebugProtocol) WriteMessageBegin Uses

func (tdp *TDebugProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error

func (*TDebugProtocol) WriteMessageEnd Uses

func (tdp *TDebugProtocol) WriteMessageEnd() error

func (*TDebugProtocol) WriteSetBegin Uses

func (tdp *TDebugProtocol) WriteSetBegin(elemType TType, size int) error

func (*TDebugProtocol) WriteSetEnd Uses

func (tdp *TDebugProtocol) WriteSetEnd() error

func (*TDebugProtocol) WriteString Uses

func (tdp *TDebugProtocol) WriteString(value string) error

func (*TDebugProtocol) WriteStructBegin Uses

func (tdp *TDebugProtocol) WriteStructBegin(name string) error

func (*TDebugProtocol) WriteStructEnd Uses

func (tdp *TDebugProtocol) WriteStructEnd() error

type TDebugProtocolFactory Uses

type TDebugProtocolFactory struct {
    Underlying TProtocolFactory
    LogPrefix  string
}

func NewTDebugProtocolFactory Uses

func NewTDebugProtocolFactory(underlying TProtocolFactory, logPrefix string) *TDebugProtocolFactory

func (*TDebugProtocolFactory) GetProtocol Uses

func (t *TDebugProtocolFactory) GetProtocol(trans TTransport) TProtocol

type TDeserializer Uses

type TDeserializer struct {
    Transport TTransport
    Protocol  TProtocol
}

func NewTDeserializer Uses

func NewTDeserializer() *TDeserializer

func (*TDeserializer) Read Uses

func (t *TDeserializer) Read(msg TStruct, b []byte) (err error)

func (*TDeserializer) ReadString Uses

func (t *TDeserializer) ReadString(msg TStruct, s string) (err error)

type TException Uses

type TException interface {
    error
}

Generic Thrift exception

type TFramedTransport Uses

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

func NewTFramedTransport Uses

func NewTFramedTransport(transport TTransport) *TFramedTransport

func NewTFramedTransportMaxLength Uses

func NewTFramedTransportMaxLength(transport TTransport, maxLength uint32) *TFramedTransport

func (*TFramedTransport) Close Uses

func (p *TFramedTransport) Close() error

func (*TFramedTransport) Flush Uses

func (p *TFramedTransport) Flush() error

func (*TFramedTransport) IsOpen Uses

func (p *TFramedTransport) IsOpen() bool

func (*TFramedTransport) Open Uses

func (p *TFramedTransport) Open() error

func (*TFramedTransport) Read Uses

func (p *TFramedTransport) Read(buf []byte) (l int, err error)

func (*TFramedTransport) ReadByte Uses

func (p *TFramedTransport) ReadByte() (c byte, err error)

func (*TFramedTransport) RemainingBytes Uses

func (p *TFramedTransport) RemainingBytes() (num_bytes uint64)

func (*TFramedTransport) Write Uses

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

func (*TFramedTransport) WriteByte Uses

func (p *TFramedTransport) WriteByte(c byte) error

func (*TFramedTransport) WriteString Uses

func (p *TFramedTransport) WriteString(s string) (n int, err error)

type THttpClient Uses

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

func (*THttpClient) Close Uses

func (p *THttpClient) Close() error

func (*THttpClient) DelHeader Uses

func (p *THttpClient) DelHeader(key string)

Deletes the HTTP Header given a Header Key for this specific Thrift Transport It is important that you first assert the TTransport as a THttpClient type like so:

httpTrans := trans.(THttpClient) httpTrans.DelHeader("User-Agent")

func (*THttpClient) Flush Uses

func (p *THttpClient) Flush() error

func (*THttpClient) GetHeader Uses

func (p *THttpClient) GetHeader(key string) string

Get the HTTP Header represented by the supplied Header Key for this specific Thrift Transport It is important that you first assert the TTransport as a THttpClient type like so:

httpTrans := trans.(THttpClient) hdrValue := httpTrans.GetHeader("User-Agent")

func (*THttpClient) IsOpen Uses

func (p *THttpClient) IsOpen() bool

func (*THttpClient) Open Uses

func (p *THttpClient) Open() error

func (*THttpClient) Read Uses

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

func (*THttpClient) ReadByte Uses

func (p *THttpClient) ReadByte() (c byte, err error)

func (*THttpClient) RemainingBytes Uses

func (p *THttpClient) RemainingBytes() (num_bytes uint64)

func (*THttpClient) SetHeader Uses

func (p *THttpClient) SetHeader(key string, value string)

Set the HTTP Header for this specific Thrift Transport It is important that you first assert the TTransport as a THttpClient type like so:

httpTrans := trans.(THttpClient) httpTrans.SetHeader("User-Agent","Thrift Client 1.0")

func (*THttpClient) Write Uses

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

func (*THttpClient) WriteByte Uses

func (p *THttpClient) WriteByte(c byte) error

func (*THttpClient) WriteString Uses

func (p *THttpClient) WriteString(s string) (n int, err error)

type THttpClientOptions Uses

type THttpClientOptions struct {
    // If nil, DefaultHttpClient is used
    Client *http.Client
}

type THttpClientTransportFactory Uses

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

func NewTHttpClientTransportFactory Uses

func NewTHttpClientTransportFactory(url string) *THttpClientTransportFactory

func NewTHttpClientTransportFactoryWithOptions Uses

func NewTHttpClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory

func NewTHttpPostClientTransportFactory Uses

func NewTHttpPostClientTransportFactory(url string) *THttpClientTransportFactory

func NewTHttpPostClientTransportFactoryWithOptions Uses

func NewTHttpPostClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory

func (*THttpClientTransportFactory) GetTransport Uses

func (p *THttpClientTransportFactory) GetTransport(trans TTransport) TTransport

type TJSONProtocol Uses

type TJSONProtocol struct {
    *TSimpleJSONProtocol
}

JSON protocol implementation for thrift.

This protocol produces/consumes a simple output format suitable for parsing by scripting languages. It should not be confused with the full-featured TJSONProtocol.

func NewTJSONProtocol Uses

func NewTJSONProtocol(t TTransport) *TJSONProtocol

Constructor

func (*TJSONProtocol) Flush Uses

func (p *TJSONProtocol) Flush() (err error)

func (*TJSONProtocol) OutputElemListBegin Uses

func (p *TJSONProtocol) OutputElemListBegin(elemType TType, size int) error

func (*TJSONProtocol) ParseElemListBegin Uses

func (p *TJSONProtocol) ParseElemListBegin() (elemType TType, size int, e error)

func (*TJSONProtocol) ReadBinary Uses

func (p *TJSONProtocol) ReadBinary() ([]byte, error)

func (*TJSONProtocol) ReadBool Uses

func (p *TJSONProtocol) ReadBool() (bool, error)

func (*TJSONProtocol) ReadByte Uses

func (p *TJSONProtocol) ReadByte() (int8, error)

func (*TJSONProtocol) ReadDouble Uses

func (p *TJSONProtocol) ReadDouble() (float64, error)

func (*TJSONProtocol) ReadFieldBegin Uses

func (p *TJSONProtocol) ReadFieldBegin() (string, TType, int16, error)

func (*TJSONProtocol) ReadFieldEnd Uses

func (p *TJSONProtocol) ReadFieldEnd() error

func (*TJSONProtocol) ReadI16 Uses

func (p *TJSONProtocol) ReadI16() (int16, error)

func (*TJSONProtocol) ReadI32 Uses

func (p *TJSONProtocol) ReadI32() (int32, error)

func (*TJSONProtocol) ReadI64 Uses

func (p *TJSONProtocol) ReadI64() (int64, error)

func (*TJSONProtocol) ReadListBegin Uses

func (p *TJSONProtocol) ReadListBegin() (elemType TType, size int, e error)

func (*TJSONProtocol) ReadListEnd Uses

func (p *TJSONProtocol) ReadListEnd() error

func (*TJSONProtocol) ReadMapBegin Uses

func (p *TJSONProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, e error)

func (*TJSONProtocol) ReadMapEnd Uses

func (p *TJSONProtocol) ReadMapEnd() error

func (*TJSONProtocol) ReadMessageBegin Uses

func (p *TJSONProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)

Reading methods.

func (*TJSONProtocol) ReadMessageEnd Uses

func (p *TJSONProtocol) ReadMessageEnd() error

func (*TJSONProtocol) ReadSetBegin Uses

func (p *TJSONProtocol) ReadSetBegin() (elemType TType, size int, e error)

func (*TJSONProtocol) ReadSetEnd Uses

func (p *TJSONProtocol) ReadSetEnd() error

func (*TJSONProtocol) ReadString Uses

func (p *TJSONProtocol) ReadString() (string, error)

func (*TJSONProtocol) ReadStructBegin Uses

func (p *TJSONProtocol) ReadStructBegin() (name string, err error)

func (*TJSONProtocol) ReadStructEnd Uses

func (p *TJSONProtocol) ReadStructEnd() error

func (*TJSONProtocol) Skip Uses

func (p *TJSONProtocol) Skip(fieldType TType) (err error)

func (*TJSONProtocol) StringToTypeId Uses

func (p *TJSONProtocol) StringToTypeId(fieldType string) (TType, error)

func (*TJSONProtocol) Transport Uses

func (p *TJSONProtocol) Transport() TTransport

func (*TJSONProtocol) TypeIdToString Uses

func (p *TJSONProtocol) TypeIdToString(fieldType TType) (string, error)

func (*TJSONProtocol) WriteBinary Uses

func (p *TJSONProtocol) WriteBinary(v []byte) error

func (*TJSONProtocol) WriteBool Uses

func (p *TJSONProtocol) WriteBool(b bool) error

func (*TJSONProtocol) WriteByte Uses

func (p *TJSONProtocol) WriteByte(b int8) error

func (*TJSONProtocol) WriteDouble Uses

func (p *TJSONProtocol) WriteDouble(v float64) error

func (*TJSONProtocol) WriteFieldBegin Uses

func (p *TJSONProtocol) WriteFieldBegin(name string, typeId TType, id int16) error

func (*TJSONProtocol) WriteFieldEnd Uses

func (p *TJSONProtocol) WriteFieldEnd() error

func (*TJSONProtocol) WriteFieldStop Uses

func (p *TJSONProtocol) WriteFieldStop() error

func (*TJSONProtocol) WriteI16 Uses

func (p *TJSONProtocol) WriteI16(v int16) error

func (*TJSONProtocol) WriteI32 Uses

func (p *TJSONProtocol) WriteI32(v int32) error

func (*TJSONProtocol) WriteI64 Uses

func (p *TJSONProtocol) WriteI64(v int64) error

func (*TJSONProtocol) WriteListBegin Uses

func (p *TJSONProtocol) WriteListBegin(elemType TType, size int) error

func (*TJSONProtocol) WriteListEnd Uses

func (p *TJSONProtocol) WriteListEnd() error

func (*TJSONProtocol) WriteMapBegin Uses

func (p *TJSONProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error

func (*TJSONProtocol) WriteMapEnd Uses

func (p *TJSONProtocol) WriteMapEnd() error

func (*TJSONProtocol) WriteMessageBegin Uses

func (p *TJSONProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error

func (*TJSONProtocol) WriteMessageEnd Uses

func (p *TJSONProtocol) WriteMessageEnd() error

func (*TJSONProtocol) WriteSetBegin Uses

func (p *TJSONProtocol) WriteSetBegin(elemType TType, size int) error

func (*TJSONProtocol) WriteSetEnd Uses

func (p *TJSONProtocol) WriteSetEnd() error

func (*TJSONProtocol) WriteString Uses

func (p *TJSONProtocol) WriteString(v string) error

func (*TJSONProtocol) WriteStructBegin Uses

func (p *TJSONProtocol) WriteStructBegin(name string) error

func (*TJSONProtocol) WriteStructEnd Uses

func (p *TJSONProtocol) WriteStructEnd() error

type TJSONProtocolFactory Uses

type TJSONProtocolFactory struct{}

Factory

func NewTJSONProtocolFactory Uses

func NewTJSONProtocolFactory() *TJSONProtocolFactory

func (*TJSONProtocolFactory) GetProtocol Uses

func (p *TJSONProtocolFactory) GetProtocol(trans TTransport) TProtocol

type TMemoryBuffer Uses

type TMemoryBuffer struct {
    *bytes.Buffer
    // contains filtered or unexported fields
}

Memory buffer-based implementation of the TTransport interface.

func NewTMemoryBuffer Uses

func NewTMemoryBuffer() *TMemoryBuffer

func NewTMemoryBufferLen Uses

func NewTMemoryBufferLen(size int) *TMemoryBuffer

func (*TMemoryBuffer) Close Uses

func (p *TMemoryBuffer) Close() error

func (*TMemoryBuffer) Flush Uses

func (p *TMemoryBuffer) Flush() error

Flushing a memory buffer is a no-op

func (*TMemoryBuffer) IsOpen Uses

func (p *TMemoryBuffer) IsOpen() bool

func (*TMemoryBuffer) Open Uses

func (p *TMemoryBuffer) Open() error

func (*TMemoryBuffer) RemainingBytes Uses

func (p *TMemoryBuffer) RemainingBytes() (num_bytes uint64)

type TMemoryBufferTransportFactory Uses

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

func NewTMemoryBufferTransportFactory Uses

func NewTMemoryBufferTransportFactory(size int) *TMemoryBufferTransportFactory

func (*TMemoryBufferTransportFactory) GetTransport Uses

func (p *TMemoryBufferTransportFactory) GetTransport(trans TTransport) TTransport

type TMessageType Uses

type TMessageType int32

Message type constants in the Thrift protocol.

const (
    INVALID_TMESSAGE_TYPE TMessageType = 0
    CALL                  TMessageType = 1
    REPLY                 TMessageType = 2
    EXCEPTION             TMessageType = 3
    ONEWAY                TMessageType = 4
)

type TMultiplexedProcessor Uses

type TMultiplexedProcessor struct {
    DefaultProcessor TProcessor
    // contains filtered or unexported fields
}

func NewTMultiplexedProcessor Uses

func NewTMultiplexedProcessor() *TMultiplexedProcessor

func (*TMultiplexedProcessor) Process Uses

func (t *TMultiplexedProcessor) Process(in, out TProtocol) (bool, TException)

func (*TMultiplexedProcessor) RegisterDefault Uses

func (t *TMultiplexedProcessor) RegisterDefault(processor TProcessor)

func (*TMultiplexedProcessor) RegisterProcessor Uses

func (t *TMultiplexedProcessor) RegisterProcessor(name string, processor TProcessor)

type TMultiplexedProtocol Uses

type TMultiplexedProtocol struct {
    TProtocol
    // contains filtered or unexported fields
}

func NewTMultiplexedProtocol Uses

func NewTMultiplexedProtocol(protocol TProtocol, serviceName string) *TMultiplexedProtocol

func (*TMultiplexedProtocol) WriteMessageBegin Uses

func (t *TMultiplexedProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error

type TProcessor Uses

type TProcessor interface {
    Process(in, out TProtocol) (bool, TException)
}

A processor is a generic object which operates upon an input stream and writes to some output stream.

type TProcessorFactory Uses

type TProcessorFactory interface {
    GetProcessor(trans TTransport) TProcessor
}

The default processor factory just returns a singleton instance.

func NewTProcessorFactory Uses

func NewTProcessorFactory(p TProcessor) TProcessorFactory

type TProcessorFunction Uses

type TProcessorFunction interface {
    Process(seqId int32, in, out TProtocol) (bool, TException)
}

type TProcessorFunctionFactory Uses

type TProcessorFunctionFactory interface {
    GetProcessorFunction(trans TTransport) TProcessorFunction
}

*

* The default processor factory just returns a singleton
* instance.

func NewTProcessorFunctionFactory Uses

func NewTProcessorFunctionFactory(p TProcessorFunction) TProcessorFunctionFactory

type TProtocol Uses

type TProtocol interface {
    WriteMessageBegin(name string, typeId TMessageType, seqid int32) error
    WriteMessageEnd() error
    WriteStructBegin(name string) error
    WriteStructEnd() error
    WriteFieldBegin(name string, typeId TType, id int16) error
    WriteFieldEnd() error
    WriteFieldStop() error
    WriteMapBegin(keyType TType, valueType TType, size int) error
    WriteMapEnd() error
    WriteListBegin(elemType TType, size int) error
    WriteListEnd() error
    WriteSetBegin(elemType TType, size int) error
    WriteSetEnd() error
    WriteBool(value bool) error
    WriteByte(value int8) error
    WriteI16(value int16) error
    WriteI32(value int32) error
    WriteI64(value int64) error
    WriteDouble(value float64) error
    WriteString(value string) error
    WriteBinary(value []byte) error

    ReadMessageBegin() (name string, typeId TMessageType, seqid int32, err error)
    ReadMessageEnd() error
    ReadStructBegin() (name string, err error)
    ReadStructEnd() error
    ReadFieldBegin() (name string, typeId TType, id int16, err error)
    ReadFieldEnd() error
    ReadMapBegin() (keyType TType, valueType TType, size int, err error)
    ReadMapEnd() error
    ReadListBegin() (elemType TType, size int, err error)
    ReadListEnd() error
    ReadSetBegin() (elemType TType, size int, err error)
    ReadSetEnd() error
    ReadBool() (value bool, err error)
    ReadByte() (value int8, err error)
    ReadI16() (value int16, err error)
    ReadI32() (value int32, err error)
    ReadI64() (value int64, err error)
    ReadDouble() (value float64, err error)
    ReadString() (value string, err error)
    ReadBinary() (value []byte, err error)

    Skip(fieldType TType) (err error)
    Flush() (err error)

    Transport() TTransport
}

type TProtocolException Uses

type TProtocolException interface {
    TException
    TypeId() int
}

Thrift Protocol exception

func NewTProtocolException Uses

func NewTProtocolException(err error) TProtocolException

func NewTProtocolExceptionWithType Uses

func NewTProtocolExceptionWithType(errType int, err error) TProtocolException

type TProtocolFactory Uses

type TProtocolFactory interface {
    GetProtocol(trans TTransport) TProtocol
}

Factory interface for constructing protocol instances.

type TRichTransport Uses

type TRichTransport interface {
    io.ReadWriter
    io.ByteReader
    io.ByteWriter

    Flusher
    ReadSizeProvider
    // contains filtered or unexported methods
}

This is "enchanced" transport with extra capabilities. You need to use one of these to construct protocol. Notably, TSocket does not implement this interface, and it is always a mistake to use TSocket directly in protocol.

type TSSLServerSocket Uses

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

func NewTSSLServerSocket Uses

func NewTSSLServerSocket(listenAddr string, cfg *tls.Config) (*TSSLServerSocket, error)

func NewTSSLServerSocketTimeout Uses

func NewTSSLServerSocketTimeout(listenAddr string, cfg *tls.Config, clientTimeout time.Duration) (*TSSLServerSocket, error)

func (*TSSLServerSocket) Accept Uses

func (p *TSSLServerSocket) Accept() (TTransport, error)

func (*TSSLServerSocket) Addr Uses

func (p *TSSLServerSocket) Addr() net.Addr

func (*TSSLServerSocket) Close Uses

func (p *TSSLServerSocket) Close() error

func (*TSSLServerSocket) Interrupt Uses

func (p *TSSLServerSocket) Interrupt() error

func (*TSSLServerSocket) IsListening Uses

func (p *TSSLServerSocket) IsListening() bool

Checks whether the socket is listening.

func (*TSSLServerSocket) Listen Uses

func (p *TSSLServerSocket) Listen() error

func (*TSSLServerSocket) Open Uses

func (p *TSSLServerSocket) Open() error

Connects the socket, creating a new socket object if necessary.

type TSSLSocket Uses

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

func NewTSSLSocket Uses

func NewTSSLSocket(hostPort string, cfg *tls.Config) (*TSSLSocket, error)

NewTSSLSocket creates a net.Conn-backed TTransport, given a host and port and tls Configuration

Example:

trans, err := thrift.NewTSSLSocket("localhost:9090", nil)

func NewTSSLSocketFromAddrTimeout Uses

func NewTSSLSocketFromAddrTimeout(addr net.Addr, cfg *tls.Config, timeout time.Duration) *TSSLSocket

Creates a TSSLSocket from a net.Addr

func NewTSSLSocketFromConnTimeout Uses

func NewTSSLSocketFromConnTimeout(conn net.Conn, cfg *tls.Config, timeout time.Duration) *TSSLSocket

Creates a TSSLSocket from an existing net.Conn

func NewTSSLSocketTimeout Uses

func NewTSSLSocketTimeout(hostPort string, cfg *tls.Config, timeout time.Duration) (*TSSLSocket, error)

NewTSSLSocketTimeout creates a net.Conn-backed TTransport, given a host and port it also accepts a tls Configuration and a timeout as a time.Duration

func (*TSSLSocket) Close Uses

func (p *TSSLSocket) Close() error

Closes the socket.

func (*TSSLSocket) Conn Uses

func (p *TSSLSocket) Conn() net.Conn

Retrieve the underlying net.Conn

func (*TSSLSocket) Flush Uses

func (p *TSSLSocket) Flush() error

func (*TSSLSocket) Interrupt Uses

func (p *TSSLSocket) Interrupt() error

func (*TSSLSocket) IsOpen Uses

func (p *TSSLSocket) IsOpen() bool

Returns true if the connection is open

func (*TSSLSocket) Open Uses

func (p *TSSLSocket) Open() error

Connects the socket, creating a new socket object if necessary.

func (*TSSLSocket) Read Uses

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

func (*TSSLSocket) RemainingBytes Uses

func (p *TSSLSocket) RemainingBytes() (num_bytes uint64)

func (*TSSLSocket) SetTimeout Uses

func (p *TSSLSocket) SetTimeout(timeout time.Duration) error

Sets the socket timeout

func (*TSSLSocket) Write Uses

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

type TSerializer Uses

type TSerializer struct {
    Transport *TMemoryBuffer
    Protocol  TProtocol
}

func NewTSerializer Uses

func NewTSerializer() *TSerializer

func (*TSerializer) Write Uses

func (t *TSerializer) Write(msg TStruct) (b []byte, err error)

func (*TSerializer) WriteString Uses

func (t *TSerializer) WriteString(msg TStruct) (s string, err error)

type TServer Uses

type TServer interface {
    ProcessorFactory() TProcessorFactory
    ServerTransport() TServerTransport
    InputTransportFactory() TTransportFactory
    OutputTransportFactory() TTransportFactory
    InputProtocolFactory() TProtocolFactory
    OutputProtocolFactory() TProtocolFactory

    // Starts the server
    Serve() error
    // Stops the server. This is optional on a per-implementation basis. Not
    // all servers are required to be cleanly stoppable.
    Stop() error
}

type TServerSocket Uses

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

func NewTServerSocket Uses

func NewTServerSocket(listenAddr string) (*TServerSocket, error)

func NewTServerSocketTimeout Uses

func NewTServerSocketTimeout(listenAddr string, clientTimeout time.Duration) (*TServerSocket, error)

func (*TServerSocket) Accept Uses

func (p *TServerSocket) Accept() (TTransport, error)

func (*TServerSocket) Addr Uses

func (p *TServerSocket) Addr() net.Addr

func (*TServerSocket) Close Uses

func (p *TServerSocket) Close() error

func (*TServerSocket) Interrupt Uses

func (p *TServerSocket) Interrupt() error

func (*TServerSocket) IsListening Uses

func (p *TServerSocket) IsListening() bool

Checks whether the socket is listening.

func (*TServerSocket) Listen Uses

func (p *TServerSocket) Listen() error

func (*TServerSocket) Open Uses

func (p *TServerSocket) Open() error

Connects the socket, creating a new socket object if necessary.

type TServerTransport Uses

type TServerTransport interface {
    Listen() error
    Accept() (TTransport, error)
    Close() error

    // Optional method implementation. This signals to the server transport
    // that it should break out of any accept() or listen() that it is currently
    // blocked on. This method, if implemented, MUST be thread safe, as it may
    // be called from a different thread context than the other TServerTransport
    // methods.
    Interrupt() error
}

Server transport. Object which provides client transports.

type TSimpleJSONProtocol Uses

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

JSON protocol implementation for thrift.

This protocol produces/consumes a simple output format suitable for parsing by scripting languages. It should not be confused with the full-featured TJSONProtocol.

func NewTSimpleJSONProtocol Uses

func NewTSimpleJSONProtocol(t TTransport) *TSimpleJSONProtocol

Constructor

func (*TSimpleJSONProtocol) Flush Uses

func (p *TSimpleJSONProtocol) Flush() (err error)

func (*TSimpleJSONProtocol) OutputBool Uses

func (p *TSimpleJSONProtocol) OutputBool(value bool) error

func (*TSimpleJSONProtocol) OutputElemListBegin Uses

func (p *TSimpleJSONProtocol) OutputElemListBegin(elemType TType, size int) error

func (*TSimpleJSONProtocol) OutputF64 Uses

func (p *TSimpleJSONProtocol) OutputF64(value float64) error

func (*TSimpleJSONProtocol) OutputI64 Uses

func (p *TSimpleJSONProtocol) OutputI64(value int64) error

func (*TSimpleJSONProtocol) OutputListBegin Uses

func (p *TSimpleJSONProtocol) OutputListBegin() error

func (*TSimpleJSONProtocol) OutputListEnd Uses

func (p *TSimpleJSONProtocol) OutputListEnd() error

func (*TSimpleJSONProtocol) OutputNull Uses

func (p *TSimpleJSONProtocol) OutputNull() error

func (*TSimpleJSONProtocol) OutputObjectBegin Uses

func (p *TSimpleJSONProtocol) OutputObjectBegin() error

func (*TSimpleJSONProtocol) OutputObjectEnd Uses

func (p *TSimpleJSONProtocol) OutputObjectEnd() error

func (*TSimpleJSONProtocol) OutputPostValue Uses

func (p *TSimpleJSONProtocol) OutputPostValue() error

func (*TSimpleJSONProtocol) OutputPreValue Uses

func (p *TSimpleJSONProtocol) OutputPreValue() error

func (*TSimpleJSONProtocol) OutputString Uses

func (p *TSimpleJSONProtocol) OutputString(s string) error

func (*TSimpleJSONProtocol) OutputStringData Uses

func (p *TSimpleJSONProtocol) OutputStringData(s string) error

func (*TSimpleJSONProtocol) ParseBase64EncodedBody Uses

func (p *TSimpleJSONProtocol) ParseBase64EncodedBody() ([]byte, error)

func (*TSimpleJSONProtocol) ParseElemListBegin Uses

func (p *TSimpleJSONProtocol) ParseElemListBegin() (elemType TType, size int, e error)

func (*TSimpleJSONProtocol) ParseF64 Uses

func (p *TSimpleJSONProtocol) ParseF64() (float64, bool, error)

func (*TSimpleJSONProtocol) ParseI64 Uses

func (p *TSimpleJSONProtocol) ParseI64() (int64, bool, error)

func (*TSimpleJSONProtocol) ParseListBegin Uses

func (p *TSimpleJSONProtocol) ParseListBegin() (isNull bool, err error)

func (*TSimpleJSONProtocol) ParseListEnd Uses

func (p *TSimpleJSONProtocol) ParseListEnd() error

func (*TSimpleJSONProtocol) ParseObjectEnd Uses

func (p *TSimpleJSONProtocol) ParseObjectEnd() error

func (*TSimpleJSONProtocol) ParseObjectStart Uses

func (p *TSimpleJSONProtocol) ParseObjectStart() (bool, error)

func (*TSimpleJSONProtocol) ParsePostValue Uses

func (p *TSimpleJSONProtocol) ParsePostValue() error

func (*TSimpleJSONProtocol) ParsePreValue Uses

func (p *TSimpleJSONProtocol) ParsePreValue() error

func (*TSimpleJSONProtocol) ParseQuotedStringBody Uses

func (p *TSimpleJSONProtocol) ParseQuotedStringBody() (string, error)

func (*TSimpleJSONProtocol) ParseStringBody Uses

func (p *TSimpleJSONProtocol) ParseStringBody() (string, error)

func (*TSimpleJSONProtocol) ReadBinary Uses

func (p *TSimpleJSONProtocol) ReadBinary() ([]byte, error)

func (*TSimpleJSONProtocol) ReadBool Uses

func (p *TSimpleJSONProtocol) ReadBool() (bool, error)

func (*TSimpleJSONProtocol) ReadByte Uses

func (p *TSimpleJSONProtocol) ReadByte() (int8, error)

func (*TSimpleJSONProtocol) ReadDouble Uses

func (p *TSimpleJSONProtocol) ReadDouble() (float64, error)

func (*TSimpleJSONProtocol) ReadFieldBegin Uses

func (p *TSimpleJSONProtocol) ReadFieldBegin() (string, TType, int16, error)

func (*TSimpleJSONProtocol) ReadFieldEnd Uses

func (p *TSimpleJSONProtocol) ReadFieldEnd() error

func (*TSimpleJSONProtocol) ReadI16 Uses

func (p *TSimpleJSONProtocol) ReadI16() (int16, error)

func (*TSimpleJSONProtocol) ReadI32 Uses

func (p *TSimpleJSONProtocol) ReadI32() (int32, error)

func (*TSimpleJSONProtocol) ReadI64 Uses

func (p *TSimpleJSONProtocol) ReadI64() (int64, error)

func (*TSimpleJSONProtocol) ReadListBegin Uses

func (p *TSimpleJSONProtocol) ReadListBegin() (elemType TType, size int, e error)

func (*TSimpleJSONProtocol) ReadListEnd Uses

func (p *TSimpleJSONProtocol) ReadListEnd() error

func (*TSimpleJSONProtocol) ReadMapBegin Uses

func (p *TSimpleJSONProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, e error)

func (*TSimpleJSONProtocol) ReadMapEnd Uses

func (p *TSimpleJSONProtocol) ReadMapEnd() error

func (*TSimpleJSONProtocol) ReadMessageBegin Uses

func (p *TSimpleJSONProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)

Reading methods.

func (*TSimpleJSONProtocol) ReadMessageEnd Uses

func (p *TSimpleJSONProtocol) ReadMessageEnd() error

func (*TSimpleJSONProtocol) ReadSetBegin Uses

func (p *TSimpleJSONProtocol) ReadSetBegin() (elemType TType, size int, e error)

func (*TSimpleJSONProtocol) ReadSetEnd Uses

func (p *TSimpleJSONProtocol) ReadSetEnd() error

func (*TSimpleJSONProtocol) ReadString Uses

func (p *TSimpleJSONProtocol) ReadString() (string, error)

func (*TSimpleJSONProtocol) ReadStructBegin Uses

func (p *TSimpleJSONProtocol) ReadStructBegin() (name string, err error)

func (*TSimpleJSONProtocol) ReadStructEnd Uses

func (p *TSimpleJSONProtocol) ReadStructEnd() error

func (*TSimpleJSONProtocol) Skip Uses

func (p *TSimpleJSONProtocol) Skip(fieldType TType) (err error)

func (*TSimpleJSONProtocol) Transport Uses

func (p *TSimpleJSONProtocol) Transport() TTransport

func (*TSimpleJSONProtocol) WriteBinary Uses

func (p *TSimpleJSONProtocol) WriteBinary(v []byte) error

func (*TSimpleJSONProtocol) WriteBool Uses

func (p *TSimpleJSONProtocol) WriteBool(b bool) error

func (*TSimpleJSONProtocol) WriteByte Uses

func (p *TSimpleJSONProtocol) WriteByte(b int8) error

func (*TSimpleJSONProtocol) WriteDouble Uses

func (p *TSimpleJSONProtocol) WriteDouble(v float64) error

func (*TSimpleJSONProtocol) WriteFieldBegin Uses

func (p *TSimpleJSONProtocol) WriteFieldBegin(name string, typeId TType, id int16) error

func (*TSimpleJSONProtocol) WriteFieldEnd Uses

func (p *TSimpleJSONProtocol) WriteFieldEnd() error

func (*TSimpleJSONProtocol) WriteFieldStop Uses

func (p *TSimpleJSONProtocol) WriteFieldStop() error

func (*TSimpleJSONProtocol) WriteI16 Uses

func (p *TSimpleJSONProtocol) WriteI16(v int16) error

func (*TSimpleJSONProtocol) WriteI32 Uses

func (p *TSimpleJSONProtocol) WriteI32(v int32) error

func (*TSimpleJSONProtocol) WriteI64 Uses

func (p *TSimpleJSONProtocol) WriteI64(v int64) error

func (*TSimpleJSONProtocol) WriteListBegin Uses

func (p *TSimpleJSONProtocol) WriteListBegin(elemType TType, size int) error

func (*TSimpleJSONProtocol) WriteListEnd Uses

func (p *TSimpleJSONProtocol) WriteListEnd() error

func (*TSimpleJSONProtocol) WriteMapBegin Uses

func (p *TSimpleJSONProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error

func (*TSimpleJSONProtocol) WriteMapEnd Uses

func (p *TSimpleJSONProtocol) WriteMapEnd() error

func (*TSimpleJSONProtocol) WriteMessageBegin Uses

func (p *TSimpleJSONProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error

func (*TSimpleJSONProtocol) WriteMessageEnd Uses

func (p *TSimpleJSONProtocol) WriteMessageEnd() error

func (*TSimpleJSONProtocol) WriteSetBegin Uses

func (p *TSimpleJSONProtocol) WriteSetBegin(elemType TType, size int) error

func (*TSimpleJSONProtocol) WriteSetEnd Uses

func (p *TSimpleJSONProtocol) WriteSetEnd() error

func (*TSimpleJSONProtocol) WriteString Uses

func (p *TSimpleJSONProtocol) WriteString(v string) error

func (*TSimpleJSONProtocol) WriteStructBegin Uses

func (p *TSimpleJSONProtocol) WriteStructBegin(name string) error

func (*TSimpleJSONProtocol) WriteStructEnd Uses

func (p *TSimpleJSONProtocol) WriteStructEnd() error

type TSimpleJSONProtocolFactory Uses

type TSimpleJSONProtocolFactory struct{}

Factory

func NewTSimpleJSONProtocolFactory Uses

func NewTSimpleJSONProtocolFactory() *TSimpleJSONProtocolFactory

func (*TSimpleJSONProtocolFactory) GetProtocol Uses

func (p *TSimpleJSONProtocolFactory) GetProtocol(trans TTransport) TProtocol

type TSimpleServer Uses

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

Simple, non-concurrent server for testing.

func NewTSimpleServer2 Uses

func NewTSimpleServer2(processor TProcessor, serverTransport TServerTransport) *TSimpleServer

func NewTSimpleServer4 Uses

func NewTSimpleServer4(processor TProcessor, serverTransport TServerTransport, transportFactory TTransportFactory, protocolFactory TProtocolFactory) *TSimpleServer

func NewTSimpleServer6 Uses

func NewTSimpleServer6(processor TProcessor, serverTransport TServerTransport, inputTransportFactory TTransportFactory, outputTransportFactory TTransportFactory, inputProtocolFactory TProtocolFactory, outputProtocolFactory TProtocolFactory) *TSimpleServer

func NewTSimpleServerFactory2 Uses

func NewTSimpleServerFactory2(processorFactory TProcessorFactory, serverTransport TServerTransport) *TSimpleServer

func NewTSimpleServerFactory4 Uses

func NewTSimpleServerFactory4(processorFactory TProcessorFactory, serverTransport TServerTransport, transportFactory TTransportFactory, protocolFactory TProtocolFactory) *TSimpleServer

func NewTSimpleServerFactory6 Uses

func NewTSimpleServerFactory6(processorFactory TProcessorFactory, serverTransport TServerTransport, inputTransportFactory TTransportFactory, outputTransportFactory TTransportFactory, inputProtocolFactory TProtocolFactory, outputProtocolFactory TProtocolFactory) *TSimpleServer

func (*TSimpleServer) AcceptLoop Uses

func (p *TSimpleServer) AcceptLoop() error

func (*TSimpleServer) InputProtocolFactory Uses

func (p *TSimpleServer) InputProtocolFactory() TProtocolFactory

func (*TSimpleServer) InputTransportFactory Uses

func (p *TSimpleServer) InputTransportFactory() TTransportFactory

func (*TSimpleServer) Listen Uses

func (p *TSimpleServer) Listen() error

func (*TSimpleServer) OutputProtocolFactory Uses

func (p *TSimpleServer) OutputProtocolFactory() TProtocolFactory

func (*TSimpleServer) OutputTransportFactory Uses

func (p *TSimpleServer) OutputTransportFactory() TTransportFactory

func (*TSimpleServer) ProcessorFactory Uses

func (p *TSimpleServer) ProcessorFactory() TProcessorFactory

func (*TSimpleServer) Serve Uses

func (p *TSimpleServer) Serve() error

func (*TSimpleServer) ServerTransport Uses

func (p *TSimpleServer) ServerTransport() TServerTransport

func (*TSimpleServer) Stop Uses

func (p *TSimpleServer) Stop() error

type TSocket Uses

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

func NewTSocket Uses

func NewTSocket(hostPort string) (*TSocket, error)

NewTSocket creates a net.Conn-backed TTransport, given a host and port

Example:

trans, err := thrift.NewTSocket("localhost:9090")

func NewTSocketFromAddrTimeout Uses

func NewTSocketFromAddrTimeout(addr net.Addr, timeout time.Duration) *TSocket

Creates a TSocket from a net.Addr

func NewTSocketFromConnTimeout Uses

func NewTSocketFromConnTimeout(conn net.Conn, timeout time.Duration) *TSocket

Creates a TSocket from an existing net.Conn

func NewTSocketTimeout Uses

func NewTSocketTimeout(hostPort string, timeout time.Duration) (*TSocket, error)

NewTSocketTimeout creates a net.Conn-backed TTransport, given a host and port it also accepts a timeout as a time.Duration

func (*TSocket) Addr Uses

func (p *TSocket) Addr() net.Addr

Returns the remote address of the socket.

func (*TSocket) Close Uses

func (p *TSocket) Close() error

Closes the socket.

func (*TSocket) Conn Uses

func (p *TSocket) Conn() net.Conn

Retrieve the underlying net.Conn

func (*TSocket) Flush Uses

func (p *TSocket) Flush() error

func (*TSocket) Interrupt Uses

func (p *TSocket) Interrupt() error

func (*TSocket) IsOpen Uses

func (p *TSocket) IsOpen() bool

Returns true if the connection is open

func (*TSocket) Open Uses

func (p *TSocket) Open() error

Connects the socket, creating a new socket object if necessary.

func (*TSocket) Read Uses

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

func (*TSocket) RemainingBytes Uses

func (p *TSocket) RemainingBytes() (num_bytes uint64)

func (*TSocket) SetTimeout Uses

func (p *TSocket) SetTimeout(timeout time.Duration) error

Sets the socket timeout

func (*TSocket) Write Uses

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

type TStruct Uses

type TStruct interface {
    Write(p TProtocol) error
    Read(p TProtocol) error
}

type TTransport Uses

type TTransport interface {
    io.ReadWriteCloser
    Flusher
    ReadSizeProvider

    // Opens the transport for communication
    Open() error

    // Returns true if the transport is open
    IsOpen() bool
}

Encapsulates the I/O layer

func NewTHttpClient Uses

func NewTHttpClient(urlstr string) (TTransport, error)

func NewTHttpClientWithOptions Uses

func NewTHttpClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error)

func NewTHttpPostClient Uses

func NewTHttpPostClient(urlstr string) (TTransport, error)

func NewTHttpPostClientWithOptions Uses

func NewTHttpPostClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error)

type TTransportException Uses

type TTransportException interface {
    TException
    TypeId() int
    Err() error
}

Thrift Transport exception

func NewTTransportException Uses

func NewTTransportException(t int, e string) TTransportException

func NewTTransportExceptionFromError Uses

func NewTTransportExceptionFromError(e error) TTransportException

type TTransportFactory Uses

type TTransportFactory interface {
    GetTransport(trans TTransport) TTransport
}

Factory class used to create wrapped instance of Transports. This is used primarily in servers, which get Transports from a ServerTransport and then may want to mutate them (i.e. create a BufferedTransport from the underlying base transport)

func NewTFramedTransportFactory Uses

func NewTFramedTransportFactory(factory TTransportFactory) TTransportFactory

func NewTFramedTransportFactoryMaxLength Uses

func NewTFramedTransportFactoryMaxLength(factory TTransportFactory, maxLength uint32) TTransportFactory

func NewTTransportFactory Uses

func NewTTransportFactory() TTransportFactory

type TType Uses

type TType byte

Type constants in the Thrift protocol

func (TType) String Uses

func (p TType) String() string

type TZlibTransport Uses

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

TZlibTransport is a TTransport implementation that makes use of zlib compression.

func NewTZlibTransport Uses

func NewTZlibTransport(trans TTransport, level int) (*TZlibTransport, error)

NewTZlibTransport constructs a new instance of TZlibTransport

func (*TZlibTransport) Close Uses

func (z *TZlibTransport) Close() error

Close closes the reader and writer (flushing any unwritten data) and closes the underlying transport.

func (*TZlibTransport) Flush Uses

func (z *TZlibTransport) Flush() error

Flush flushes the writer and its underlying transport.

func (*TZlibTransport) IsOpen Uses

func (z *TZlibTransport) IsOpen() bool

IsOpen returns true if the transport is open

func (*TZlibTransport) Open Uses

func (z *TZlibTransport) Open() error

Open opens the transport for communication

func (*TZlibTransport) Read Uses

func (z *TZlibTransport) Read(p []byte) (int, error)

func (*TZlibTransport) RemainingBytes Uses

func (z *TZlibTransport) RemainingBytes() uint64

RemainingBytes returns the size in bytes of the data that is still to be read.

func (*TZlibTransport) Write Uses

func (z *TZlibTransport) Write(p []byte) (int, error)

type TZlibTransportFactory Uses

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

TZlibTransportFactory is a factory for TZlibTransport instances

func NewTZlibTransportFactory Uses

func NewTZlibTransportFactory(level int) *TZlibTransportFactory

NewTZlibTransportFactory constructs a new instance of NewTZlibTransportFactory

func (*TZlibTransportFactory) GetTransport Uses

func (p *TZlibTransportFactory) GetTransport(trans TTransport) TTransport

GetTransport constructs a new instance of NewTZlibTransport

Package thrift imports 21 packages (graph) and is imported by 5 packages. Updated 2019-06-20. Refresh now. Tools for package owners.