Documentation ¶
Index ¶
- Constants
- Variables
- func BoolPtr(v bool) *bool
- func ByteSlicePtr(v []byte) *[]byte
- func Float32Ptr(v float32) *float32
- func Float64Ptr(v float64) *float64
- func Int32Ptr(v int32) *int32
- func Int64Ptr(v int64) *int64
- func IntPtr(v int) *int
- func NewStoredMessageProtocol(protocol TProtocol, name string, typeId TMessageType, seqid int32) *storedMessageProtocol
- func NewThriftHandlerFunc(processor TProcessor, inPfactory, outPfactory TProtocolFactory) func(w http.ResponseWriter, r *http.Request)
- func PrependError(prepend string, err error) error
- func Skip(self TProtocol, fieldType TType, maxDepth int) (err error)
- func SkipDefaultDepth(prot TProtocol, typeId TType) (err error)
- func StringPtr(v string) *string
- func Uint32Ptr(v uint32) *uint32
- func Uint64Ptr(v uint64) *uint64
- type ClientType
- type Flusher
- type HeaderFlags
- type InfoIDType
- type Numeric
- type ProtocolID
- type ReadSizeProvider
- type RichTransport
- type StreamTransport
- func (p *StreamTransport) Close() error
- func (p *StreamTransport) Flush() error
- func (p *StreamTransport) IsOpen() bool
- func (p *StreamTransport) Open() error
- func (p *StreamTransport) Read(c []byte) (n int, err error)
- func (p *StreamTransport) ReadByte() (c byte, err error)
- func (p *StreamTransport) RemainingBytes() (num_bytes uint64)
- func (p *StreamTransport) Write(c []byte) (n int, err error)
- func (p *StreamTransport) WriteByte(c byte) (err error)
- func (p *StreamTransport) WriteString(s string) (n int, err error)
- type StreamTransportFactory
- type TApplicationException
- type TBinaryProtocol
- func (p *TBinaryProtocol) Flush() (err error)
- func (p *TBinaryProtocol) ReadBinary() ([]byte, error)
- func (p *TBinaryProtocol) ReadBool() (bool, error)
- func (p *TBinaryProtocol) ReadByte() (int8, error)
- func (p *TBinaryProtocol) ReadDouble() (value float64, err error)
- func (p *TBinaryProtocol) ReadFieldBegin() (name string, typeId TType, seqId int16, err error)
- func (p *TBinaryProtocol) ReadFieldEnd() error
- func (p *TBinaryProtocol) ReadI16() (value int16, err error)
- func (p *TBinaryProtocol) ReadI32() (value int32, err error)
- func (p *TBinaryProtocol) ReadI64() (value int64, err error)
- func (p *TBinaryProtocol) ReadListBegin() (elemType TType, size int, err error)
- func (p *TBinaryProtocol) ReadListEnd() error
- func (p *TBinaryProtocol) ReadMapBegin() (kType, vType TType, size int, err error)
- func (p *TBinaryProtocol) ReadMapEnd() error
- func (p *TBinaryProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
- func (p *TBinaryProtocol) ReadMessageEnd() error
- func (p *TBinaryProtocol) ReadSetBegin() (elemType TType, size int, err error)
- func (p *TBinaryProtocol) ReadSetEnd() error
- func (p *TBinaryProtocol) ReadString() (value string, err error)
- func (p *TBinaryProtocol) ReadStructBegin() (name string, err error)
- func (p *TBinaryProtocol) ReadStructEnd() error
- func (p *TBinaryProtocol) Skip(fieldType TType) (err error)
- func (p *TBinaryProtocol) Transport() TTransport
- func (p *TBinaryProtocol) WriteBinary(value []byte) error
- func (p *TBinaryProtocol) WriteBool(value bool) error
- func (p *TBinaryProtocol) WriteByte(value int8) error
- func (p *TBinaryProtocol) WriteDouble(value float64) error
- func (p *TBinaryProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
- func (p *TBinaryProtocol) WriteFieldEnd() error
- func (p *TBinaryProtocol) WriteFieldStop() error
- func (p *TBinaryProtocol) WriteI16(value int16) error
- func (p *TBinaryProtocol) WriteI32(value int32) error
- func (p *TBinaryProtocol) WriteI64(value int64) error
- func (p *TBinaryProtocol) WriteListBegin(elemType TType, size int) error
- func (p *TBinaryProtocol) WriteListEnd() error
- func (p *TBinaryProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
- func (p *TBinaryProtocol) WriteMapEnd() error
- func (p *TBinaryProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error
- func (p *TBinaryProtocol) WriteMessageEnd() error
- func (p *TBinaryProtocol) WriteSetBegin(elemType TType, size int) error
- func (p *TBinaryProtocol) WriteSetEnd() error
- func (p *TBinaryProtocol) WriteString(value string) error
- func (p *TBinaryProtocol) WriteStructBegin(name string) error
- func (p *TBinaryProtocol) WriteStructEnd() error
- type TBinaryProtocolFactory
- type TBufferedTransport
- func (p *TBufferedTransport) Close() (err error)
- func (p *TBufferedTransport) Flush() error
- func (p *TBufferedTransport) IsOpen() bool
- func (p *TBufferedTransport) Open() (err error)
- func (p *TBufferedTransport) Read(b []byte) (int, error)
- func (p *TBufferedTransport) RemainingBytes() (num_bytes uint64)
- func (p *TBufferedTransport) Write(b []byte) (int, error)
- type TBufferedTransportFactory
- type TClient
- type TCompactProtocol
- func (p *TCompactProtocol) Flush() (err error)
- func (p *TCompactProtocol) ReadBinary() (value []byte, err error)
- func (p *TCompactProtocol) ReadBool() (value bool, err error)
- func (p *TCompactProtocol) ReadByte() (int8, error)
- func (p *TCompactProtocol) ReadDouble() (value float64, err error)
- func (p *TCompactProtocol) ReadFieldBegin() (name string, typeId TType, id int16, err error)
- func (p *TCompactProtocol) ReadFieldEnd() error
- func (p *TCompactProtocol) ReadI16() (value int16, err error)
- func (p *TCompactProtocol) ReadI32() (value int32, err error)
- func (p *TCompactProtocol) ReadI64() (value int64, err error)
- func (p *TCompactProtocol) ReadListBegin() (elemType TType, size int, err error)
- func (p *TCompactProtocol) ReadListEnd() error
- func (p *TCompactProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, err error)
- func (p *TCompactProtocol) ReadMapEnd() error
- func (p *TCompactProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
- func (p *TCompactProtocol) ReadMessageEnd() error
- func (p *TCompactProtocol) ReadSetBegin() (elemType TType, size int, err error)
- func (p *TCompactProtocol) ReadSetEnd() error
- func (p *TCompactProtocol) ReadString() (value string, err error)
- func (p *TCompactProtocol) ReadStructBegin() (name string, err error)
- func (p *TCompactProtocol) ReadStructEnd() error
- func (p *TCompactProtocol) Skip(fieldType TType) (err error)
- func (p *TCompactProtocol) Transport() TTransport
- func (p *TCompactProtocol) WriteBinary(bin []byte) error
- func (p *TCompactProtocol) WriteBool(value bool) error
- func (p *TCompactProtocol) WriteByte(value int8) error
- func (p *TCompactProtocol) WriteDouble(value float64) error
- func (p *TCompactProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
- func (p *TCompactProtocol) WriteFieldEnd() error
- func (p *TCompactProtocol) WriteFieldStop() error
- func (p *TCompactProtocol) WriteI16(value int16) error
- func (p *TCompactProtocol) WriteI32(value int32) error
- func (p *TCompactProtocol) WriteI64(value int64) error
- func (p *TCompactProtocol) WriteListBegin(elemType TType, size int) error
- func (p *TCompactProtocol) WriteListEnd() error
- func (p *TCompactProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
- func (p *TCompactProtocol) WriteMapEnd() error
- func (p *TCompactProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error
- func (p *TCompactProtocol) WriteMessageEnd() error
- func (p *TCompactProtocol) WriteSetBegin(elemType TType, size int) error
- func (p *TCompactProtocol) WriteSetEnd() error
- func (p *TCompactProtocol) WriteString(value string) error
- func (p *TCompactProtocol) WriteStructBegin(name string) error
- func (p *TCompactProtocol) WriteStructEnd() error
- type TCompactProtocolFactory
- type TDebugProtocol
- func (tdp *TDebugProtocol) Flush() (err error)
- func (tdp *TDebugProtocol) ReadBinary() (value []byte, err error)
- func (tdp *TDebugProtocol) ReadBool() (value bool, err error)
- func (tdp *TDebugProtocol) ReadByte() (value int8, err error)
- func (tdp *TDebugProtocol) ReadDouble() (value float64, err error)
- func (tdp *TDebugProtocol) ReadFieldBegin() (name string, typeId TType, id int16, err error)
- func (tdp *TDebugProtocol) ReadFieldEnd() (err error)
- func (tdp *TDebugProtocol) ReadI16() (value int16, err error)
- func (tdp *TDebugProtocol) ReadI32() (value int32, err error)
- func (tdp *TDebugProtocol) ReadI64() (value int64, err error)
- func (tdp *TDebugProtocol) ReadListBegin() (elemType TType, size int, err error)
- func (tdp *TDebugProtocol) ReadListEnd() (err error)
- func (tdp *TDebugProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, err error)
- func (tdp *TDebugProtocol) ReadMapEnd() (err error)
- func (tdp *TDebugProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqid int32, err error)
- func (tdp *TDebugProtocol) ReadMessageEnd() (err error)
- func (tdp *TDebugProtocol) ReadSetBegin() (elemType TType, size int, err error)
- func (tdp *TDebugProtocol) ReadSetEnd() (err error)
- func (tdp *TDebugProtocol) ReadString() (value string, err error)
- func (tdp *TDebugProtocol) ReadStructBegin() (name string, err error)
- func (tdp *TDebugProtocol) ReadStructEnd() (err error)
- func (tdp *TDebugProtocol) Skip(fieldType TType) (err error)
- func (tdp *TDebugProtocol) Transport() TTransport
- func (tdp *TDebugProtocol) WriteBinary(value []byte) error
- func (tdp *TDebugProtocol) WriteBool(value bool) error
- func (tdp *TDebugProtocol) WriteByte(value int8) error
- func (tdp *TDebugProtocol) WriteDouble(value float64) error
- func (tdp *TDebugProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
- func (tdp *TDebugProtocol) WriteFieldEnd() error
- func (tdp *TDebugProtocol) WriteFieldStop() error
- func (tdp *TDebugProtocol) WriteI16(value int16) error
- func (tdp *TDebugProtocol) WriteI32(value int32) error
- func (tdp *TDebugProtocol) WriteI64(value int64) error
- func (tdp *TDebugProtocol) WriteListBegin(elemType TType, size int) error
- func (tdp *TDebugProtocol) WriteListEnd() error
- func (tdp *TDebugProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
- func (tdp *TDebugProtocol) WriteMapEnd() error
- func (tdp *TDebugProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error
- func (tdp *TDebugProtocol) WriteMessageEnd() error
- func (tdp *TDebugProtocol) WriteSetBegin(elemType TType, size int) error
- func (tdp *TDebugProtocol) WriteSetEnd() error
- func (tdp *TDebugProtocol) WriteString(value string) error
- func (tdp *TDebugProtocol) WriteStructBegin(name string) error
- func (tdp *TDebugProtocol) WriteStructEnd() error
- type TDebugProtocolFactory
- type TDeserializer
- type TException
- type TFramedTransport
- func (p *TFramedTransport) Close() error
- func (p *TFramedTransport) Flush() error
- func (p *TFramedTransport) IsOpen() bool
- func (p *TFramedTransport) Open() error
- func (p *TFramedTransport) Read(buf []byte) (l int, err error)
- func (p *TFramedTransport) ReadByte() (c byte, err error)
- func (p *TFramedTransport) RemainingBytes() (num_bytes uint64)
- func (p *TFramedTransport) Write(buf []byte) (int, error)
- func (p *TFramedTransport) WriteByte(c byte) error
- func (p *TFramedTransport) WriteString(s string) (n int, err error)
- type THeaderProtocol
- func (p *THeaderProtocol) AddTransform(trans TransformID) error
- func (p *THeaderProtocol) ClearHeaders()
- func (p *THeaderProtocol) ClearPersistentHeaders()
- func (p *THeaderProtocol) Flush() (err error)
- func (p *THeaderProtocol) Header(key string) (string, bool)
- func (p *THeaderProtocol) Headers() map[string]string
- func (p *THeaderProtocol) Identity() string
- func (p *THeaderProtocol) PeerIdentity() string
- func (p *THeaderProtocol) PersistentHeader(key string) (string, bool)
- func (p *THeaderProtocol) PersistentHeaders() map[string]string
- func (p *THeaderProtocol) ProtocolID() ProtocolID
- func (p *THeaderProtocol) ReadHeader(key string) (string, bool)
- func (p *THeaderProtocol) ReadHeaders() map[string]string
- func (p *THeaderProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqid int32, err error)
- func (p *THeaderProtocol) ResetProtocol() error
- func (p *THeaderProtocol) SetHeader(key, value string)
- func (p *THeaderProtocol) SetIdentity(identity string)
- func (p *THeaderProtocol) SetPersistentHeader(key, value string)
- func (p *THeaderProtocol) Skip(fieldType TType) (err error)
- func (p *THeaderProtocol) THeaderTransport() TTransport
- func (p *THeaderProtocol) Transport() TTransport
- func (p *THeaderProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error
- type THeaderProtocolFactory
- type THeaderTransport
- func (t *THeaderTransport) AddTransform(trans TransformID) error
- func (t *THeaderTransport) ClearHeaders()
- func (t *THeaderTransport) ClearPersistentHeaders()
- func (t *THeaderTransport) Close() error
- func (t *THeaderTransport) Flush() error
- func (t *THeaderTransport) Header(key string) (string, bool)
- func (t *THeaderTransport) Headers() map[string]string
- func (t *THeaderTransport) Identity() string
- func (t *THeaderTransport) IsOpen() bool
- func (t *THeaderTransport) Open() error
- func (t *THeaderTransport) PeerIdentity() string
- func (t *THeaderTransport) PersistentHeader(key string) (string, bool)
- func (t *THeaderTransport) PersistentHeaders() map[string]string
- func (t *THeaderTransport) ProtocolID() ProtocolID
- func (t *THeaderTransport) Read(buf []byte) (int, error)
- func (t *THeaderTransport) ReadByte() (byte, error)
- func (t *THeaderTransport) ReadHeader(key string) (string, bool)
- func (t *THeaderTransport) ReadHeaders() map[string]string
- func (t *THeaderTransport) RemainingBytes() uint64
- func (t *THeaderTransport) ResetProtocol() error
- func (t *THeaderTransport) SeqID() uint32
- func (t *THeaderTransport) SetHeader(key, value string)
- func (t *THeaderTransport) SetIdentity(identity string)
- func (t *THeaderTransport) SetPersistentHeader(key, value string)
- func (t *THeaderTransport) SetProtocolID(protoID ProtocolID) error
- func (t *THeaderTransport) SetSeqID(seq uint32)
- func (t *THeaderTransport) Write(buf []byte) (int, error)
- func (t *THeaderTransport) WriteByte(c byte) error
- func (t *THeaderTransport) WriteString(s string) (int, error)
- type THttpClient
- func (p *THttpClient) Close() error
- func (p *THttpClient) DelHeader(key string)
- func (p *THttpClient) Flush() error
- func (p *THttpClient) GetHeader(key string) string
- func (p *THttpClient) IsOpen() bool
- func (p *THttpClient) Open() error
- func (p *THttpClient) Read(buf []byte) (int, error)
- func (p *THttpClient) ReadByte() (c byte, err error)
- func (p *THttpClient) RemainingBytes() (num_bytes uint64)
- func (p *THttpClient) SetHeader(key string, value string)
- func (p *THttpClient) Write(buf []byte) (int, error)
- func (p *THttpClient) WriteByte(c byte) error
- func (p *THttpClient) WriteString(s string) (n int, err error)
- type THttpClientOptions
- type THttpClientTransportFactory
- func NewTHttpClientTransportFactory(url string) *THttpClientTransportFactory
- func NewTHttpClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory
- func NewTHttpPostClientTransportFactory(url string) *THttpClientTransportFactorydeprecated
- func NewTHttpPostClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactorydeprecated
- type TJSONProtocol
- func (p *TJSONProtocol) Flush() (err error)
- func (p *TJSONProtocol) OutputElemListBegin(elemType TType, size int) error
- func (p *TJSONProtocol) ParseElemListBegin() (elemType TType, size int, e error)
- func (p *TJSONProtocol) ReadBinary() ([]byte, error)
- func (p *TJSONProtocol) ReadBool() (bool, error)
- func (p *TJSONProtocol) ReadByte() (int8, error)
- func (p *TJSONProtocol) ReadDouble() (float64, error)
- func (p *TJSONProtocol) ReadFieldBegin() (string, TType, int16, error)
- func (p *TJSONProtocol) ReadFieldEnd() error
- func (p *TJSONProtocol) ReadI16() (int16, error)
- func (p *TJSONProtocol) ReadI32() (int32, error)
- func (p *TJSONProtocol) ReadI64() (int64, error)
- func (p *TJSONProtocol) ReadListBegin() (elemType TType, size int, e error)
- func (p *TJSONProtocol) ReadListEnd() error
- func (p *TJSONProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, e error)
- func (p *TJSONProtocol) ReadMapEnd() error
- func (p *TJSONProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
- func (p *TJSONProtocol) ReadMessageEnd() error
- func (p *TJSONProtocol) ReadSetBegin() (elemType TType, size int, e error)
- func (p *TJSONProtocol) ReadSetEnd() error
- func (p *TJSONProtocol) ReadString() (string, error)
- func (p *TJSONProtocol) ReadStructBegin() (name string, err error)
- func (p *TJSONProtocol) ReadStructEnd() error
- func (p *TJSONProtocol) Skip(fieldType TType) (err error)
- func (p *TJSONProtocol) StringToTypeId(fieldType string) (TType, error)
- func (p *TJSONProtocol) Transport() TTransport
- func (p *TJSONProtocol) TypeIdToString(fieldType TType) (string, error)
- func (p *TJSONProtocol) WriteBinary(v []byte) error
- func (p *TJSONProtocol) WriteBool(b bool) error
- func (p *TJSONProtocol) WriteByte(b int8) error
- func (p *TJSONProtocol) WriteDouble(v float64) error
- func (p *TJSONProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
- func (p *TJSONProtocol) WriteFieldEnd() error
- func (p *TJSONProtocol) WriteFieldStop() error
- func (p *TJSONProtocol) WriteI16(v int16) error
- func (p *TJSONProtocol) WriteI32(v int32) error
- func (p *TJSONProtocol) WriteI64(v int64) error
- func (p *TJSONProtocol) WriteListBegin(elemType TType, size int) error
- func (p *TJSONProtocol) WriteListEnd() error
- func (p *TJSONProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
- func (p *TJSONProtocol) WriteMapEnd() error
- func (p *TJSONProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error
- func (p *TJSONProtocol) WriteMessageEnd() error
- func (p *TJSONProtocol) WriteSetBegin(elemType TType, size int) error
- func (p *TJSONProtocol) WriteSetEnd() error
- func (p *TJSONProtocol) WriteString(v string) error
- func (p *TJSONProtocol) WriteStructBegin(name string) error
- func (p *TJSONProtocol) WriteStructEnd() error
- type TJSONProtocolFactory
- type TMemoryBuffer
- type TMemoryBufferTransportFactory
- type TMessageType
- type TMultiplexedProcessor
- type TMultiplexedProtocol
- type TProcessor
- type TProcessorFactory
- type TProcessorFunction
- type TProcessorFunctionFactory
- type TProtocol
- type TProtocolException
- type TProtocolFactory
- type TRichTransport
- type TSSLServerSocket
- func (p *TSSLServerSocket) Accept() (TTransport, error)
- func (p *TSSLServerSocket) Addr() net.Addr
- func (p *TSSLServerSocket) Close() error
- func (p *TSSLServerSocket) Interrupt() error
- func (p *TSSLServerSocket) IsListening() bool
- func (p *TSSLServerSocket) Listen() error
- func (p *TSSLServerSocket) Open() error
- type TSSLSocket
- func NewTSSLSocket(hostPort string, cfg *tls.Config) (*TSSLSocket, error)
- func NewTSSLSocketFromAddrTimeout(addr net.Addr, cfg *tls.Config, timeout time.Duration) *TSSLSocket
- func NewTSSLSocketFromConnTimeout(conn net.Conn, cfg *tls.Config, timeout time.Duration) *TSSLSocket
- func NewTSSLSocketTimeout(hostPort string, cfg *tls.Config, timeout time.Duration) (*TSSLSocket, error)
- func (p *TSSLSocket) Close() error
- func (p *TSSLSocket) Conn() net.Conn
- func (p *TSSLSocket) Flush() error
- func (p *TSSLSocket) Interrupt() error
- func (p *TSSLSocket) IsOpen() bool
- func (p *TSSLSocket) Open() error
- func (p *TSSLSocket) Read(buf []byte) (int, error)
- func (p *TSSLSocket) RemainingBytes() (num_bytes uint64)
- func (p *TSSLSocket) SetTimeout(timeout time.Duration) error
- func (p *TSSLSocket) Write(buf []byte) (int, error)
- type TSerializer
- type TServer
- type TServerSocket
- type TServerTransport
- type TSimpleJSONProtocol
- func (p *TSimpleJSONProtocol) Flush() (err error)
- func (p *TSimpleJSONProtocol) OutputBool(value bool) error
- func (p *TSimpleJSONProtocol) OutputElemListBegin(elemType TType, size int) error
- func (p *TSimpleJSONProtocol) OutputF64(value float64) error
- func (p *TSimpleJSONProtocol) OutputI64(value int64) error
- func (p *TSimpleJSONProtocol) OutputListBegin() error
- func (p *TSimpleJSONProtocol) OutputListEnd() error
- func (p *TSimpleJSONProtocol) OutputNull() error
- func (p *TSimpleJSONProtocol) OutputObjectBegin() error
- func (p *TSimpleJSONProtocol) OutputObjectEnd() error
- func (p *TSimpleJSONProtocol) OutputPostValue() error
- func (p *TSimpleJSONProtocol) OutputPreValue() error
- func (p *TSimpleJSONProtocol) OutputString(s string) error
- func (p *TSimpleJSONProtocol) OutputStringData(s string) error
- func (p *TSimpleJSONProtocol) ParseBase64EncodedBody() ([]byte, error)
- func (p *TSimpleJSONProtocol) ParseElemListBegin() (elemType TType, size int, e error)
- func (p *TSimpleJSONProtocol) ParseF64() (float64, bool, error)
- func (p *TSimpleJSONProtocol) ParseI64() (int64, bool, error)
- func (p *TSimpleJSONProtocol) ParseListBegin() (isNull bool, err error)
- func (p *TSimpleJSONProtocol) ParseListEnd() error
- func (p *TSimpleJSONProtocol) ParseObjectEnd() error
- func (p *TSimpleJSONProtocol) ParseObjectStart() (bool, error)
- func (p *TSimpleJSONProtocol) ParsePostValue() error
- func (p *TSimpleJSONProtocol) ParsePreValue() error
- func (p *TSimpleJSONProtocol) ParseQuotedStringBody() (string, error)
- func (p *TSimpleJSONProtocol) ParseStringBody() (string, error)
- func (p *TSimpleJSONProtocol) ReadBinary() ([]byte, error)
- func (p *TSimpleJSONProtocol) ReadBool() (bool, error)
- func (p *TSimpleJSONProtocol) ReadByte() (int8, error)
- func (p *TSimpleJSONProtocol) ReadDouble() (float64, error)
- func (p *TSimpleJSONProtocol) ReadFieldBegin() (string, TType, int16, error)
- func (p *TSimpleJSONProtocol) ReadFieldEnd() error
- func (p *TSimpleJSONProtocol) ReadI16() (int16, error)
- func (p *TSimpleJSONProtocol) ReadI32() (int32, error)
- func (p *TSimpleJSONProtocol) ReadI64() (int64, error)
- func (p *TSimpleJSONProtocol) ReadListBegin() (elemType TType, size int, e error)
- func (p *TSimpleJSONProtocol) ReadListEnd() error
- func (p *TSimpleJSONProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, e error)
- func (p *TSimpleJSONProtocol) ReadMapEnd() error
- func (p *TSimpleJSONProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
- func (p *TSimpleJSONProtocol) ReadMessageEnd() error
- func (p *TSimpleJSONProtocol) ReadSetBegin() (elemType TType, size int, e error)
- func (p *TSimpleJSONProtocol) ReadSetEnd() error
- func (p *TSimpleJSONProtocol) ReadString() (string, error)
- func (p *TSimpleJSONProtocol) ReadStructBegin() (name string, err error)
- func (p *TSimpleJSONProtocol) ReadStructEnd() error
- func (p *TSimpleJSONProtocol) Skip(fieldType TType) (err error)
- func (p *TSimpleJSONProtocol) Transport() TTransport
- func (p *TSimpleJSONProtocol) WriteBinary(v []byte) error
- func (p *TSimpleJSONProtocol) WriteBool(b bool) error
- func (p *TSimpleJSONProtocol) WriteByte(b int8) error
- func (p *TSimpleJSONProtocol) WriteDouble(v float64) error
- func (p *TSimpleJSONProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
- func (p *TSimpleJSONProtocol) WriteFieldEnd() error
- func (p *TSimpleJSONProtocol) WriteFieldStop() error
- func (p *TSimpleJSONProtocol) WriteI16(v int16) error
- func (p *TSimpleJSONProtocol) WriteI32(v int32) error
- func (p *TSimpleJSONProtocol) WriteI64(v int64) error
- func (p *TSimpleJSONProtocol) WriteListBegin(elemType TType, size int) error
- func (p *TSimpleJSONProtocol) WriteListEnd() error
- func (p *TSimpleJSONProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
- func (p *TSimpleJSONProtocol) WriteMapEnd() error
- func (p *TSimpleJSONProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error
- func (p *TSimpleJSONProtocol) WriteMessageEnd() error
- func (p *TSimpleJSONProtocol) WriteSetBegin(elemType TType, size int) error
- func (p *TSimpleJSONProtocol) WriteSetEnd() error
- func (p *TSimpleJSONProtocol) WriteString(v string) error
- func (p *TSimpleJSONProtocol) WriteStructBegin(name string) error
- func (p *TSimpleJSONProtocol) WriteStructEnd() error
- type TSimpleJSONProtocolFactory
- type TSimpleServer
- func NewTSimpleServer2(processor TProcessor, serverTransport TServerTransport) *TSimpleServer
- func NewTSimpleServer4(processor TProcessor, serverTransport TServerTransport, ...) *TSimpleServer
- func NewTSimpleServer6(processor TProcessor, serverTransport TServerTransport, ...) *TSimpleServer
- func NewTSimpleServerFactory2(processorFactory TProcessorFactory, serverTransport TServerTransport) *TSimpleServer
- func NewTSimpleServerFactory4(processorFactory TProcessorFactory, serverTransport TServerTransport, ...) *TSimpleServer
- func NewTSimpleServerFactory6(processorFactory TProcessorFactory, serverTransport TServerTransport, ...) *TSimpleServer
- func (p *TSimpleServer) AcceptLoop() error
- func (p *TSimpleServer) InputProtocolFactory() TProtocolFactory
- func (p *TSimpleServer) InputTransportFactory() TTransportFactory
- func (p *TSimpleServer) Listen() error
- func (p *TSimpleServer) OutputProtocolFactory() TProtocolFactory
- func (p *TSimpleServer) OutputTransportFactory() TTransportFactory
- func (p *TSimpleServer) ProcessorFactory() TProcessorFactory
- func (p *TSimpleServer) Serve() error
- func (p *TSimpleServer) ServerTransport() TServerTransport
- func (p *TSimpleServer) Stop() error
- type TSocket
- func (p *TSocket) Addr() net.Addr
- func (p *TSocket) Close() error
- func (p *TSocket) Conn() net.Conn
- func (p *TSocket) Flush() error
- func (p *TSocket) Interrupt() error
- func (p *TSocket) IsOpen() bool
- func (p *TSocket) Open() error
- func (p *TSocket) Read(buf []byte) (int, error)
- func (p *TSocket) RemainingBytes() (num_bytes uint64)
- func (p *TSocket) SetTimeout(timeout time.Duration) error
- func (p *TSocket) Write(buf []byte) (int, error)
- type TStandardClient
- type TStruct
- type TTransport
- func NewTHttpClient(urlstr string) (TTransport, error)
- func NewTHttpClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error)
- func NewTHttpPostClient(urlstr string) (TTransport, error)deprecated
- func NewTHttpPostClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error)deprecated
- type TTransportException
- type TTransportFactory
- func NewTFramedTransportFactory(factory TTransportFactory) TTransportFactory
- func NewTFramedTransportFactoryMaxLength(factory TTransportFactory, maxLength uint32) TTransportFactory
- func NewTHeaderTransportFactory(factory TTransportFactory) TTransportFactory
- func NewTTransportFactory() TTransportFactory
- type TType
- type TZlibTransport
- func (z *TZlibTransport) Close() error
- func (z *TZlibTransport) Flush() error
- func (z *TZlibTransport) IsOpen() bool
- func (z *TZlibTransport) Open() error
- func (z *TZlibTransport) Read(p []byte) (int, error)
- func (z *TZlibTransport) RemainingBytes() uint64
- func (z *TZlibTransport) Write(p []byte) (int, error)
- type TZlibTransportFactory
- type TransformID
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 = 0x01 COMPACT_VERSION_BE = 0x02 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 ( IdentityHeader string = "identity" IDVersionHeader string = "id_version" IDVersion string = "1" PriorityHeader string = "thrift_priority" ClientTimeoutHeader string = "client_timeout" QueueTimeoutHeader string = "queue_timeout" // Header Magicks // 0 and 16th bits must be 0 to differentiate from framed & unframed HeaderMagic uint32 = 0x0FFF0000 HeaderMask uint32 = 0xFFFF0000 FlagsMask uint32 = 0x0000FFFF HTTPServerMagic uint32 = 0x504F5354 // POST HTTPClientMagic uint32 = 0x48545450 // HTTP HTTPGetClientMagic uint32 = 0x47455420 // GET HTTPHeadClientMagic uint32 = 0x48454144 // HEAD BigFrameMagic uint32 = 0x42494746 // BIGF MaxFrameSize uint32 = 0x3FFFFFFF CommonHeaderSize uint64 = 10 MaxHeaderSize uint32 = 131071 )
Header keys
const ( DefaulprotoID = ProtocolIDCompact DefaultClientType = HeaderClientType )
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 INVALID_FRAME_SIZE = 5 )
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 BinaryVersion1 uint32 = 0x80010000
const BinaryVersionMask uint32 = 0xffff0000
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.
Functions ¶
func ByteSlicePtr ¶
func Float32Ptr ¶
func Float64Ptr ¶
func NewStoredMessageProtocol ¶
func NewStoredMessageProtocol(protocol TProtocol, name string, typeId TMessageType, seqid int32) *storedMessageProtocol
func NewThriftHandlerFunc ¶
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 ¶
Prepends additional information to an error without losing the Thrift exception interface
func SkipDefaultDepth ¶
Skips over the next data element from the provided input TProtocol object.
Types ¶
type ClientType ¶
type ClientType int64
const ( HeaderClientType ClientType = iota FramedDeprecated UnframedDeprecated HTTPServerType HTTPClientType FramedCompact HeaderSASLClientType HTTPGetClientType UnknownClientType UnframedCompactDeprecated )
func (ClientType) String ¶
func (c ClientType) String() string
type HeaderFlags ¶
type HeaderFlags uint32
const ( HeaderFlagSupportOutOfOrder HeaderFlags = 0x01 HeaderFlagDuplexReverse HeaderFlags = 0x08 HeaderFlagSASL HeaderFlags = 0x10 )
type InfoIDType ¶
type InfoIDType uint32
const ( InfoIDPadding InfoIDType = 0 InfoIDKeyValue InfoIDType = 1 InfoIDPKeyValue InfoIDType = 2 )
type Numeric ¶
type Numeric interface { Int64() int64 Int32() int32 Int16() int16 Byte() byte Int() int Float64() float64 Float32() float32 String() string // contains filtered or unexported methods }
func NewNullNumeric ¶
func NewNullNumeric() Numeric
func NewNumericFromDouble ¶
func NewNumericFromI32 ¶
func NewNumericFromI64 ¶
func NewNumericFromString ¶
type ProtocolID ¶
type ProtocolID int16
const ( ProtocolIDBinary ProtocolID = 0 ProtocolIDJSON ProtocolID = 1 ProtocolIDCompact ProtocolID = 2 ProtocolIDDebug ProtocolID = 3 ProtocolIDVirtual ProtocolID = 4 ProtocolIDSimpleJSON ProtocolID = 5 )
func (ProtocolID) String ¶
func (p ProtocolID) String() string
type ReadSizeProvider ¶
type ReadSizeProvider interface {
RemainingBytes() (num_bytes uint64)
}
type RichTransport ¶
type RichTransport struct {
TTransport
}
func NewTRichTransport ¶
func NewTRichTransport(trans TTransport) *RichTransport
Wraps Transport to provide TRichTransport interface
func (*RichTransport) ReadByte ¶
func (r *RichTransport) ReadByte() (c byte, err error)
func (*RichTransport) RemainingBytes ¶
func (r *RichTransport) RemainingBytes() (num_bytes uint64)
func (*RichTransport) WriteByte ¶
func (r *RichTransport) WriteByte(c byte) error
func (*RichTransport) WriteString ¶
func (r *RichTransport) WriteString(s string) (n int, err error)
type StreamTransport ¶
StreamTransport is a Transport made of an io.Reader and/or an io.Writer
func NewStreamTransport ¶
func NewStreamTransport(r io.Reader, w io.Writer) *StreamTransport
func NewStreamTransportR ¶
func NewStreamTransportR(r io.Reader) *StreamTransport
func NewStreamTransportRW ¶
func NewStreamTransportRW(rw io.ReadWriter) *StreamTransport
func NewStreamTransportW ¶
func NewStreamTransportW(w io.Writer) *StreamTransport
func (*StreamTransport) Close ¶
func (p *StreamTransport) Close() error
Closes both the input and output streams.
func (*StreamTransport) Flush ¶
func (p *StreamTransport) Flush() error
Flushes the underlying output stream if not null.
func (*StreamTransport) IsOpen ¶
func (p *StreamTransport) IsOpen() bool
func (*StreamTransport) Open ¶
func (p *StreamTransport) Open() error
implicitly opened on creation, can't be reopened once closed
func (*StreamTransport) ReadByte ¶
func (p *StreamTransport) ReadByte() (c byte, err error)
func (*StreamTransport) RemainingBytes ¶
func (p *StreamTransport) RemainingBytes() (num_bytes uint64)
func (*StreamTransport) WriteByte ¶
func (p *StreamTransport) WriteByte(c byte) (err error)
func (*StreamTransport) WriteString ¶
func (p *StreamTransport) WriteString(s string) (n int, err error)
type StreamTransportFactory ¶
type StreamTransportFactory struct { Reader io.Reader Writer io.Writer // contains filtered or unexported fields }
func (*StreamTransportFactory) GetTransport ¶
func (p *StreamTransportFactory) GetTransport(trans TTransport) (TTransport, error)
type TApplicationException ¶
type TApplicationException interface { TException TypeId() int32 Read(iprot TProtocol) error Write(oprot TProtocol) error }
Application level Thrift exception
func NewTApplicationException ¶
func NewTApplicationException(type_ int32, message string) TApplicationException
type TBinaryProtocol ¶
type TBinaryProtocol struct {
// contains filtered or unexported fields
}
func NewTBinaryProtocol ¶
func NewTBinaryProtocol(t TTransport, strictRead, strictWrite bool) *TBinaryProtocol
func NewTBinaryProtocolTransport ¶
func NewTBinaryProtocolTransport(t TTransport) *TBinaryProtocol
func (*TBinaryProtocol) Flush ¶
func (p *TBinaryProtocol) Flush() (err error)
func (*TBinaryProtocol) ReadBinary ¶
func (p *TBinaryProtocol) ReadBinary() ([]byte, error)
func (*TBinaryProtocol) ReadBool ¶
func (p *TBinaryProtocol) ReadBool() (bool, error)
func (*TBinaryProtocol) ReadByte ¶
func (p *TBinaryProtocol) ReadByte() (int8, error)
func (*TBinaryProtocol) ReadDouble ¶
func (p *TBinaryProtocol) ReadDouble() (value float64, err error)
func (*TBinaryProtocol) ReadFieldBegin ¶
func (p *TBinaryProtocol) ReadFieldBegin() (name string, typeId TType, seqId int16, err error)
func (*TBinaryProtocol) ReadFieldEnd ¶
func (p *TBinaryProtocol) ReadFieldEnd() error
func (*TBinaryProtocol) ReadI16 ¶
func (p *TBinaryProtocol) ReadI16() (value int16, err error)
func (*TBinaryProtocol) ReadI32 ¶
func (p *TBinaryProtocol) ReadI32() (value int32, err error)
func (*TBinaryProtocol) ReadI64 ¶
func (p *TBinaryProtocol) ReadI64() (value int64, err error)
func (*TBinaryProtocol) ReadListBegin ¶
func (p *TBinaryProtocol) ReadListBegin() (elemType TType, size int, err error)
func (*TBinaryProtocol) ReadListEnd ¶
func (p *TBinaryProtocol) ReadListEnd() error
func (*TBinaryProtocol) ReadMapBegin ¶
func (p *TBinaryProtocol) ReadMapBegin() (kType, vType TType, size int, err error)
func (*TBinaryProtocol) ReadMapEnd ¶
func (p *TBinaryProtocol) ReadMapEnd() error
func (*TBinaryProtocol) ReadMessageBegin ¶
func (p *TBinaryProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
func (*TBinaryProtocol) ReadMessageEnd ¶
func (p *TBinaryProtocol) ReadMessageEnd() error
func (*TBinaryProtocol) ReadSetBegin ¶
func (p *TBinaryProtocol) ReadSetBegin() (elemType TType, size int, err error)
func (*TBinaryProtocol) ReadSetEnd ¶
func (p *TBinaryProtocol) ReadSetEnd() error
func (*TBinaryProtocol) ReadString ¶
func (p *TBinaryProtocol) ReadString() (value string, err error)
func (*TBinaryProtocol) ReadStructBegin ¶
func (p *TBinaryProtocol) ReadStructBegin() (name string, err error)
func (*TBinaryProtocol) ReadStructEnd ¶
func (p *TBinaryProtocol) ReadStructEnd() error
func (*TBinaryProtocol) Skip ¶
func (p *TBinaryProtocol) Skip(fieldType TType) (err error)
func (*TBinaryProtocol) Transport ¶
func (p *TBinaryProtocol) Transport() TTransport
func (*TBinaryProtocol) WriteBinary ¶
func (p *TBinaryProtocol) WriteBinary(value []byte) error
func (*TBinaryProtocol) WriteBool ¶
func (p *TBinaryProtocol) WriteBool(value bool) error
func (*TBinaryProtocol) WriteByte ¶
func (p *TBinaryProtocol) WriteByte(value int8) error
func (*TBinaryProtocol) WriteDouble ¶
func (p *TBinaryProtocol) WriteDouble(value float64) error
func (*TBinaryProtocol) WriteFieldBegin ¶
func (p *TBinaryProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
func (*TBinaryProtocol) WriteFieldEnd ¶
func (p *TBinaryProtocol) WriteFieldEnd() error
func (*TBinaryProtocol) WriteFieldStop ¶
func (p *TBinaryProtocol) WriteFieldStop() error
func (*TBinaryProtocol) WriteI16 ¶
func (p *TBinaryProtocol) WriteI16(value int16) error
func (*TBinaryProtocol) WriteI32 ¶
func (p *TBinaryProtocol) WriteI32(value int32) error
func (*TBinaryProtocol) WriteI64 ¶
func (p *TBinaryProtocol) WriteI64(value int64) error
func (*TBinaryProtocol) WriteListBegin ¶
func (p *TBinaryProtocol) WriteListBegin(elemType TType, size int) error
func (*TBinaryProtocol) WriteListEnd ¶
func (p *TBinaryProtocol) WriteListEnd() error
func (*TBinaryProtocol) WriteMapBegin ¶
func (p *TBinaryProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
func (*TBinaryProtocol) WriteMapEnd ¶
func (p *TBinaryProtocol) WriteMapEnd() error
func (*TBinaryProtocol) WriteMessageBegin ¶
func (p *TBinaryProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error
func (*TBinaryProtocol) WriteMessageEnd ¶
func (p *TBinaryProtocol) WriteMessageEnd() error
func (*TBinaryProtocol) WriteSetBegin ¶
func (p *TBinaryProtocol) WriteSetBegin(elemType TType, size int) error
func (*TBinaryProtocol) WriteSetEnd ¶
func (p *TBinaryProtocol) WriteSetEnd() error
func (*TBinaryProtocol) WriteString ¶
func (p *TBinaryProtocol) WriteString(value string) error
func (*TBinaryProtocol) WriteStructBegin ¶
func (p *TBinaryProtocol) WriteStructBegin(name string) error
func (*TBinaryProtocol) WriteStructEnd ¶
func (p *TBinaryProtocol) WriteStructEnd() error
type TBinaryProtocolFactory ¶
type TBinaryProtocolFactory struct {
// contains filtered or unexported fields
}
func NewTBinaryProtocolFactory ¶
func NewTBinaryProtocolFactory(strictRead, strictWrite bool) *TBinaryProtocolFactory
func NewTBinaryProtocolFactoryDefault ¶
func NewTBinaryProtocolFactoryDefault() *TBinaryProtocolFactory
func (*TBinaryProtocolFactory) GetProtocol ¶
func (p *TBinaryProtocolFactory) GetProtocol(t TTransport) TProtocol
type TBufferedTransport ¶
type TBufferedTransport struct { bufio.ReadWriter // contains filtered or unexported fields }
func NewTBufferedTransport ¶
func NewTBufferedTransport(trans TTransport, bufferSize int) *TBufferedTransport
func (*TBufferedTransport) Close ¶
func (p *TBufferedTransport) Close() (err error)
func (*TBufferedTransport) Flush ¶
func (p *TBufferedTransport) Flush() error
func (*TBufferedTransport) IsOpen ¶
func (p *TBufferedTransport) IsOpen() bool
func (*TBufferedTransport) Open ¶
func (p *TBufferedTransport) Open() (err error)
func (*TBufferedTransport) RemainingBytes ¶
func (p *TBufferedTransport) RemainingBytes() (num_bytes uint64)
type TBufferedTransportFactory ¶
type TBufferedTransportFactory struct {
// contains filtered or unexported fields
}
func NewTBufferedTransportFactory ¶
func NewTBufferedTransportFactory(bufferSize int) *TBufferedTransportFactory
func (*TBufferedTransportFactory) GetTransport ¶
func (p *TBufferedTransportFactory) GetTransport(trans TTransport) (TTransport, error)
type TCompactProtocol ¶
type TCompactProtocol struct {
// contains filtered or unexported fields
}
func NewTCompactProtocol ¶
func NewTCompactProtocol(trans TTransport) *TCompactProtocol
Create a TCompactProtocol given a TTransport
func (*TCompactProtocol) Flush ¶
func (p *TCompactProtocol) Flush() (err error)
func (*TCompactProtocol) ReadBinary ¶
func (p *TCompactProtocol) ReadBinary() (value []byte, err error)
Read a []byte from the wire.
func (*TCompactProtocol) ReadBool ¶
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 ¶
func (p *TCompactProtocol) ReadByte() (int8, error)
Read a single byte off the wire. Nothing interesting here.
func (*TCompactProtocol) ReadDouble ¶
func (p *TCompactProtocol) ReadDouble() (value float64, err error)
No magic here - just read a double off the wire.
func (*TCompactProtocol) ReadFieldBegin ¶
func (p *TCompactProtocol) ReadFieldBegin() (name string, typeId TType, id int16, err error)
Read a field header off the wire.
func (*TCompactProtocol) ReadFieldEnd ¶
func (p *TCompactProtocol) ReadFieldEnd() error
func (*TCompactProtocol) ReadI16 ¶
func (p *TCompactProtocol) ReadI16() (value int16, err error)
Read an i16 from the wire as a zigzag varint.
func (*TCompactProtocol) ReadI32 ¶
func (p *TCompactProtocol) ReadI32() (value int32, err error)
Read an i32 from the wire as a zigzag varint.
func (*TCompactProtocol) ReadI64 ¶
func (p *TCompactProtocol) ReadI64() (value int64, err error)
Read an i64 from the wire as a zigzag varint.
func (*TCompactProtocol) ReadListBegin ¶
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 ¶
func (p *TCompactProtocol) ReadListEnd() error
func (*TCompactProtocol) ReadMapBegin ¶
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 ¶
func (p *TCompactProtocol) ReadMapEnd() error
func (*TCompactProtocol) ReadMessageBegin ¶
func (p *TCompactProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
Read a message header.
func (*TCompactProtocol) ReadMessageEnd ¶
func (p *TCompactProtocol) ReadMessageEnd() error
func (*TCompactProtocol) ReadSetBegin ¶
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 ¶
func (p *TCompactProtocol) ReadSetEnd() error
func (*TCompactProtocol) ReadString ¶
func (p *TCompactProtocol) ReadString() (value string, err error)
Reads a []byte (via readBinary), and then UTF-8 decodes it.
func (*TCompactProtocol) ReadStructBegin ¶
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 ¶
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 ¶
func (p *TCompactProtocol) Skip(fieldType TType) (err error)
func (*TCompactProtocol) Transport ¶
func (p *TCompactProtocol) Transport() TTransport
func (*TCompactProtocol) WriteBinary ¶
func (p *TCompactProtocol) WriteBinary(bin []byte) error
Write a byte array, using a varint for the size.
func (*TCompactProtocol) WriteBool ¶
func (p *TCompactProtocol) WriteBool(value bool) error
func (*TCompactProtocol) WriteByte ¶
func (p *TCompactProtocol) WriteByte(value int8) error
Write a byte. Nothing to see here!
func (*TCompactProtocol) WriteDouble ¶
func (p *TCompactProtocol) WriteDouble(value float64) error
Write a double to the wire as 8 bytes.
func (*TCompactProtocol) WriteFieldBegin ¶
func (p *TCompactProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
func (*TCompactProtocol) WriteFieldEnd ¶
func (p *TCompactProtocol) WriteFieldEnd() error
func (*TCompactProtocol) WriteFieldStop ¶
func (p *TCompactProtocol) WriteFieldStop() error
func (*TCompactProtocol) WriteI16 ¶
func (p *TCompactProtocol) WriteI16(value int16) error
Write an I16 as a zigzag varint.
func (*TCompactProtocol) WriteI32 ¶
func (p *TCompactProtocol) WriteI32(value int32) error
Write an i32 as a zigzag varint.
func (*TCompactProtocol) WriteI64 ¶
func (p *TCompactProtocol) WriteI64(value int64) error
Write an i64 as a zigzag varint.
func (*TCompactProtocol) WriteListBegin ¶
func (p *TCompactProtocol) WriteListBegin(elemType TType, size int) error
Write a list header.
func (*TCompactProtocol) WriteListEnd ¶
func (p *TCompactProtocol) WriteListEnd() error
func (*TCompactProtocol) WriteMapBegin ¶
func (p *TCompactProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
func (*TCompactProtocol) WriteMapEnd ¶
func (p *TCompactProtocol) WriteMapEnd() error
func (*TCompactProtocol) WriteMessageBegin ¶
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 ¶
func (p *TCompactProtocol) WriteMessageEnd() error
func (*TCompactProtocol) WriteSetBegin ¶
func (p *TCompactProtocol) WriteSetBegin(elemType TType, size int) error
Write a set header.
func (*TCompactProtocol) WriteSetEnd ¶
func (p *TCompactProtocol) WriteSetEnd() error
func (*TCompactProtocol) WriteString ¶
func (p *TCompactProtocol) WriteString(value string) error
Write a string to the wire with a varint size preceding.
func (*TCompactProtocol) WriteStructBegin ¶
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 ¶
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 ¶
type TCompactProtocolFactory struct{}
func NewTCompactProtocolFactory ¶
func NewTCompactProtocolFactory() *TCompactProtocolFactory
func (*TCompactProtocolFactory) GetProtocol ¶
func (p *TCompactProtocolFactory) GetProtocol(trans TTransport) TProtocol
type TDebugProtocol ¶
func (*TDebugProtocol) Flush ¶
func (tdp *TDebugProtocol) Flush() (err error)
func (*TDebugProtocol) ReadBinary ¶
func (tdp *TDebugProtocol) ReadBinary() (value []byte, err error)
func (*TDebugProtocol) ReadBool ¶
func (tdp *TDebugProtocol) ReadBool() (value bool, err error)
func (*TDebugProtocol) ReadByte ¶
func (tdp *TDebugProtocol) ReadByte() (value int8, err error)
func (*TDebugProtocol) ReadDouble ¶
func (tdp *TDebugProtocol) ReadDouble() (value float64, err error)
func (*TDebugProtocol) ReadFieldBegin ¶
func (tdp *TDebugProtocol) ReadFieldBegin() (name string, typeId TType, id int16, err error)
func (*TDebugProtocol) ReadFieldEnd ¶
func (tdp *TDebugProtocol) ReadFieldEnd() (err error)
func (*TDebugProtocol) ReadI16 ¶
func (tdp *TDebugProtocol) ReadI16() (value int16, err error)
func (*TDebugProtocol) ReadI32 ¶
func (tdp *TDebugProtocol) ReadI32() (value int32, err error)
func (*TDebugProtocol) ReadI64 ¶
func (tdp *TDebugProtocol) ReadI64() (value int64, err error)
func (*TDebugProtocol) ReadListBegin ¶
func (tdp *TDebugProtocol) ReadListBegin() (elemType TType, size int, err error)
func (*TDebugProtocol) ReadListEnd ¶
func (tdp *TDebugProtocol) ReadListEnd() (err error)
func (*TDebugProtocol) ReadMapBegin ¶
func (tdp *TDebugProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, err error)
func (*TDebugProtocol) ReadMapEnd ¶
func (tdp *TDebugProtocol) ReadMapEnd() (err error)
func (*TDebugProtocol) ReadMessageBegin ¶
func (tdp *TDebugProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqid int32, err error)
func (*TDebugProtocol) ReadMessageEnd ¶
func (tdp *TDebugProtocol) ReadMessageEnd() (err error)
func (*TDebugProtocol) ReadSetBegin ¶
func (tdp *TDebugProtocol) ReadSetBegin() (elemType TType, size int, err error)
func (*TDebugProtocol) ReadSetEnd ¶
func (tdp *TDebugProtocol) ReadSetEnd() (err error)
func (*TDebugProtocol) ReadString ¶
func (tdp *TDebugProtocol) ReadString() (value string, err error)
func (*TDebugProtocol) ReadStructBegin ¶
func (tdp *TDebugProtocol) ReadStructBegin() (name string, err error)
func (*TDebugProtocol) ReadStructEnd ¶
func (tdp *TDebugProtocol) ReadStructEnd() (err error)
func (*TDebugProtocol) Skip ¶
func (tdp *TDebugProtocol) Skip(fieldType TType) (err error)
func (*TDebugProtocol) Transport ¶
func (tdp *TDebugProtocol) Transport() TTransport
func (*TDebugProtocol) WriteBinary ¶
func (tdp *TDebugProtocol) WriteBinary(value []byte) error
func (*TDebugProtocol) WriteBool ¶
func (tdp *TDebugProtocol) WriteBool(value bool) error
func (*TDebugProtocol) WriteByte ¶
func (tdp *TDebugProtocol) WriteByte(value int8) error
func (*TDebugProtocol) WriteDouble ¶
func (tdp *TDebugProtocol) WriteDouble(value float64) error
func (*TDebugProtocol) WriteFieldBegin ¶
func (tdp *TDebugProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
func (*TDebugProtocol) WriteFieldEnd ¶
func (tdp *TDebugProtocol) WriteFieldEnd() error
func (*TDebugProtocol) WriteFieldStop ¶
func (tdp *TDebugProtocol) WriteFieldStop() error
func (*TDebugProtocol) WriteI16 ¶
func (tdp *TDebugProtocol) WriteI16(value int16) error
func (*TDebugProtocol) WriteI32 ¶
func (tdp *TDebugProtocol) WriteI32(value int32) error
func (*TDebugProtocol) WriteI64 ¶
func (tdp *TDebugProtocol) WriteI64(value int64) error
func (*TDebugProtocol) WriteListBegin ¶
func (tdp *TDebugProtocol) WriteListBegin(elemType TType, size int) error
func (*TDebugProtocol) WriteListEnd ¶
func (tdp *TDebugProtocol) WriteListEnd() error
func (*TDebugProtocol) WriteMapBegin ¶
func (tdp *TDebugProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
func (*TDebugProtocol) WriteMapEnd ¶
func (tdp *TDebugProtocol) WriteMapEnd() error
func (*TDebugProtocol) WriteMessageBegin ¶
func (tdp *TDebugProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error
func (*TDebugProtocol) WriteMessageEnd ¶
func (tdp *TDebugProtocol) WriteMessageEnd() error
func (*TDebugProtocol) WriteSetBegin ¶
func (tdp *TDebugProtocol) WriteSetBegin(elemType TType, size int) error
func (*TDebugProtocol) WriteSetEnd ¶
func (tdp *TDebugProtocol) WriteSetEnd() error
func (*TDebugProtocol) WriteString ¶
func (tdp *TDebugProtocol) WriteString(value string) error
func (*TDebugProtocol) WriteStructBegin ¶
func (tdp *TDebugProtocol) WriteStructBegin(name string) error
func (*TDebugProtocol) WriteStructEnd ¶
func (tdp *TDebugProtocol) WriteStructEnd() error
type TDebugProtocolFactory ¶
type TDebugProtocolFactory struct { Underlying TProtocolFactory LogPrefix string }
func NewTDebugProtocolFactory ¶
func NewTDebugProtocolFactory(underlying TProtocolFactory, logPrefix string) *TDebugProtocolFactory
func (*TDebugProtocolFactory) GetProtocol ¶
func (t *TDebugProtocolFactory) GetProtocol(trans TTransport) TProtocol
type TDeserializer ¶
type TDeserializer struct { Transport TTransport Protocol TProtocol }
func NewTDeserializer ¶
func NewTDeserializer() *TDeserializer
func (*TDeserializer) ReadString ¶
func (t *TDeserializer) ReadString(msg TStruct, s string) (err error)
type TFramedTransport ¶
type TFramedTransport struct {
// contains filtered or unexported fields
}
func NewTFramedTransport ¶
func NewTFramedTransport(transport TTransport) *TFramedTransport
func NewTFramedTransportMaxLength ¶
func NewTFramedTransportMaxLength(transport TTransport, maxLength uint32) *TFramedTransport
func (*TFramedTransport) Close ¶
func (p *TFramedTransport) Close() error
func (*TFramedTransport) Flush ¶
func (p *TFramedTransport) Flush() error
func (*TFramedTransport) IsOpen ¶
func (p *TFramedTransport) IsOpen() bool
func (*TFramedTransport) Open ¶
func (p *TFramedTransport) Open() error
func (*TFramedTransport) ReadByte ¶
func (p *TFramedTransport) ReadByte() (c byte, err error)
func (*TFramedTransport) RemainingBytes ¶
func (p *TFramedTransport) RemainingBytes() (num_bytes uint64)
func (*TFramedTransport) WriteByte ¶
func (p *TFramedTransport) WriteByte(c byte) error
func (*TFramedTransport) WriteString ¶
func (p *TFramedTransport) WriteString(s string) (n int, err error)
type THeaderProtocol ¶
type THeaderProtocol struct { TProtocol // contains filtered or unexported fields }
func NewTHeaderProtocol ¶
func NewTHeaderProtocol(trans TTransport) *THeaderProtocol
func (*THeaderProtocol) AddTransform ¶
func (p *THeaderProtocol) AddTransform(trans TransformID) error
func (*THeaderProtocol) ClearHeaders ¶
func (p *THeaderProtocol) ClearHeaders()
func (*THeaderProtocol) ClearPersistentHeaders ¶
func (p *THeaderProtocol) ClearPersistentHeaders()
func (*THeaderProtocol) Flush ¶
func (p *THeaderProtocol) Flush() (err error)
func (*THeaderProtocol) Headers ¶
func (p *THeaderProtocol) Headers() map[string]string
func (*THeaderProtocol) Identity ¶
func (p *THeaderProtocol) Identity() string
func (*THeaderProtocol) PeerIdentity ¶
func (p *THeaderProtocol) PeerIdentity() string
func (*THeaderProtocol) PersistentHeader ¶
func (p *THeaderProtocol) PersistentHeader(key string) (string, bool)
func (*THeaderProtocol) PersistentHeaders ¶
func (p *THeaderProtocol) PersistentHeaders() map[string]string
func (*THeaderProtocol) ProtocolID ¶
func (p *THeaderProtocol) ProtocolID() ProtocolID
func (*THeaderProtocol) ReadHeader ¶
func (p *THeaderProtocol) ReadHeader(key string) (string, bool)
func (*THeaderProtocol) ReadHeaders ¶
func (p *THeaderProtocol) ReadHeaders() map[string]string
func (*THeaderProtocol) ReadMessageBegin ¶
func (p *THeaderProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqid int32, err error)
func (*THeaderProtocol) ResetProtocol ¶
func (p *THeaderProtocol) ResetProtocol() error
func (*THeaderProtocol) SetHeader ¶
func (p *THeaderProtocol) SetHeader(key, value string)
func (*THeaderProtocol) SetIdentity ¶
func (p *THeaderProtocol) SetIdentity(identity string)
func (*THeaderProtocol) SetPersistentHeader ¶
func (p *THeaderProtocol) SetPersistentHeader(key, value string)
func (*THeaderProtocol) Skip ¶
func (p *THeaderProtocol) Skip(fieldType TType) (err error)
func (*THeaderProtocol) THeaderTransport ¶
func (p *THeaderProtocol) THeaderTransport() TTransport
func (*THeaderProtocol) Transport ¶
func (p *THeaderProtocol) Transport() TTransport
func (*THeaderProtocol) WriteMessageBegin ¶
func (p *THeaderProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error
type THeaderProtocolFactory ¶
type THeaderProtocolFactory struct{}
func NewTHeaderProtocolFactory ¶
func NewTHeaderProtocolFactory() *THeaderProtocolFactory
func (*THeaderProtocolFactory) GetProtocol ¶
func (p *THeaderProtocolFactory) GetProtocol(trans TTransport) TProtocol
type THeaderTransport ¶
type THeaderTransport struct {
// contains filtered or unexported fields
}
func NewTHeaderTransport ¶
func NewTHeaderTransport(transport TTransport) *THeaderTransport
NewTHeaderTransport Create a new transport with defaults.
func (*THeaderTransport) AddTransform ¶
func (t *THeaderTransport) AddTransform(trans TransformID) error
func (*THeaderTransport) ClearHeaders ¶
func (t *THeaderTransport) ClearHeaders()
func (*THeaderTransport) ClearPersistentHeaders ¶
func (t *THeaderTransport) ClearPersistentHeaders()
func (*THeaderTransport) Close ¶
func (t *THeaderTransport) Close() error
Close Close the internal transport
func (*THeaderTransport) Flush ¶
func (t *THeaderTransport) Flush() error
func (*THeaderTransport) Headers ¶
func (t *THeaderTransport) Headers() map[string]string
func (*THeaderTransport) Identity ¶
func (t *THeaderTransport) Identity() string
func (*THeaderTransport) IsOpen ¶
func (t *THeaderTransport) IsOpen() bool
IsOpen Is the current transport open
func (*THeaderTransport) Open ¶
func (t *THeaderTransport) Open() error
Open Open the internal transport
func (*THeaderTransport) PeerIdentity ¶
func (t *THeaderTransport) PeerIdentity() string
func (*THeaderTransport) PersistentHeader ¶
func (t *THeaderTransport) PersistentHeader(key string) (string, bool)
func (*THeaderTransport) PersistentHeaders ¶
func (t *THeaderTransport) PersistentHeaders() map[string]string
func (*THeaderTransport) ProtocolID ¶
func (t *THeaderTransport) ProtocolID() ProtocolID
func (*THeaderTransport) Read ¶
func (t *THeaderTransport) Read(buf []byte) (int, error)
Read Read from the current framebuffer. EOF if the frame is done.
func (*THeaderTransport) ReadByte ¶
func (t *THeaderTransport) ReadByte() (byte, error)
ReadByte Read a single byte from the current framebuffer. EOF if the frame is done.
func (*THeaderTransport) ReadHeader ¶
func (t *THeaderTransport) ReadHeader(key string) (string, bool)
func (*THeaderTransport) ReadHeaders ¶
func (t *THeaderTransport) ReadHeaders() map[string]string
func (*THeaderTransport) RemainingBytes ¶
func (t *THeaderTransport) RemainingBytes() uint64
RemainingBytes Return how many bytes remain in the current recv framebuffer.
func (*THeaderTransport) ResetProtocol ¶
func (t *THeaderTransport) ResetProtocol() error
ResetProtocol Needs to be called between every frame receive (BeginMessageRead) We do this to read out the header for each frame. This contains the length of the frame and protocol / metadata info.
func (*THeaderTransport) SeqID ¶
func (t *THeaderTransport) SeqID() uint32
func (*THeaderTransport) SetHeader ¶
func (t *THeaderTransport) SetHeader(key, value string)
func (*THeaderTransport) SetIdentity ¶
func (t *THeaderTransport) SetIdentity(identity string)
func (*THeaderTransport) SetPersistentHeader ¶
func (t *THeaderTransport) SetPersistentHeader(key, value string)
func (*THeaderTransport) SetProtocolID ¶
func (t *THeaderTransport) SetProtocolID(protoID ProtocolID) error
func (*THeaderTransport) SetSeqID ¶
func (t *THeaderTransport) SetSeqID(seq uint32)
func (*THeaderTransport) Write ¶
func (t *THeaderTransport) Write(buf []byte) (int, error)
Write Write multiple bytes to the framebuffer, does not send to transport.
func (*THeaderTransport) WriteByte ¶
func (t *THeaderTransport) WriteByte(c byte) error
WriteByte Write a single byte to the framebuffer, does not send to transport.
func (*THeaderTransport) WriteString ¶
func (t *THeaderTransport) WriteString(s string) (int, error)
WriteString Write a string to the framebuffer, does not send to transport.
type THttpClient ¶
type THttpClient struct {
// contains filtered or unexported fields
}
func (*THttpClient) Close ¶
func (p *THttpClient) Close() error
func (*THttpClient) DelHeader ¶
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 ¶
func (p *THttpClient) Flush() error
func (*THttpClient) GetHeader ¶
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 ¶
func (p *THttpClient) IsOpen() bool
func (*THttpClient) Open ¶
func (p *THttpClient) Open() error
func (*THttpClient) ReadByte ¶
func (p *THttpClient) ReadByte() (c byte, err error)
func (*THttpClient) RemainingBytes ¶
func (p *THttpClient) RemainingBytes() (num_bytes uint64)
func (*THttpClient) SetHeader ¶
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) WriteByte ¶
func (p *THttpClient) WriteByte(c byte) error
func (*THttpClient) WriteString ¶
func (p *THttpClient) WriteString(s string) (n int, err error)
type THttpClientOptions ¶
type THttpClientTransportFactory ¶
type THttpClientTransportFactory struct {
// contains filtered or unexported fields
}
func NewTHttpClientTransportFactory ¶
func NewTHttpClientTransportFactory(url string) *THttpClientTransportFactory
func NewTHttpClientTransportFactoryWithOptions ¶
func NewTHttpClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory
func NewTHttpPostClientTransportFactory
deprecated
func NewTHttpPostClientTransportFactory(url string) *THttpClientTransportFactory
Deprecated: Use NewTHttpClientTransportFactory instead.
func NewTHttpPostClientTransportFactoryWithOptions
deprecated
func NewTHttpPostClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory
Deprecated: Use NewTHttpClientTransportFactoryWithOptions instead.
func (*THttpClientTransportFactory) GetTransport ¶
func (p *THttpClientTransportFactory) GetTransport(trans TTransport) (TTransport, error)
type TJSONProtocol ¶
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 (*TJSONProtocol) Flush ¶
func (p *TJSONProtocol) Flush() (err error)
func (*TJSONProtocol) OutputElemListBegin ¶
func (p *TJSONProtocol) OutputElemListBegin(elemType TType, size int) error
func (*TJSONProtocol) ParseElemListBegin ¶
func (p *TJSONProtocol) ParseElemListBegin() (elemType TType, size int, e error)
func (*TJSONProtocol) ReadBinary ¶
func (p *TJSONProtocol) ReadBinary() ([]byte, error)
func (*TJSONProtocol) ReadBool ¶
func (p *TJSONProtocol) ReadBool() (bool, error)
func (*TJSONProtocol) ReadByte ¶
func (p *TJSONProtocol) ReadByte() (int8, error)
func (*TJSONProtocol) ReadDouble ¶
func (p *TJSONProtocol) ReadDouble() (float64, error)
func (*TJSONProtocol) ReadFieldBegin ¶
func (p *TJSONProtocol) ReadFieldBegin() (string, TType, int16, error)
func (*TJSONProtocol) ReadFieldEnd ¶
func (p *TJSONProtocol) ReadFieldEnd() error
func (*TJSONProtocol) ReadI16 ¶
func (p *TJSONProtocol) ReadI16() (int16, error)
func (*TJSONProtocol) ReadI32 ¶
func (p *TJSONProtocol) ReadI32() (int32, error)
func (*TJSONProtocol) ReadI64 ¶
func (p *TJSONProtocol) ReadI64() (int64, error)
func (*TJSONProtocol) ReadListBegin ¶
func (p *TJSONProtocol) ReadListBegin() (elemType TType, size int, e error)
func (*TJSONProtocol) ReadListEnd ¶
func (p *TJSONProtocol) ReadListEnd() error
func (*TJSONProtocol) ReadMapBegin ¶
func (p *TJSONProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, e error)
func (*TJSONProtocol) ReadMapEnd ¶
func (p *TJSONProtocol) ReadMapEnd() error
func (*TJSONProtocol) ReadMessageBegin ¶
func (p *TJSONProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
Reading methods.
func (*TJSONProtocol) ReadMessageEnd ¶
func (p *TJSONProtocol) ReadMessageEnd() error
func (*TJSONProtocol) ReadSetBegin ¶
func (p *TJSONProtocol) ReadSetBegin() (elemType TType, size int, e error)
func (*TJSONProtocol) ReadSetEnd ¶
func (p *TJSONProtocol) ReadSetEnd() error
func (*TJSONProtocol) ReadString ¶
func (p *TJSONProtocol) ReadString() (string, error)
func (*TJSONProtocol) ReadStructBegin ¶
func (p *TJSONProtocol) ReadStructBegin() (name string, err error)
func (*TJSONProtocol) ReadStructEnd ¶
func (p *TJSONProtocol) ReadStructEnd() error
func (*TJSONProtocol) Skip ¶
func (p *TJSONProtocol) Skip(fieldType TType) (err error)
func (*TJSONProtocol) StringToTypeId ¶
func (p *TJSONProtocol) StringToTypeId(fieldType string) (TType, error)
func (*TJSONProtocol) Transport ¶
func (p *TJSONProtocol) Transport() TTransport
func (*TJSONProtocol) TypeIdToString ¶
func (p *TJSONProtocol) TypeIdToString(fieldType TType) (string, error)
func (*TJSONProtocol) WriteBinary ¶
func (p *TJSONProtocol) WriteBinary(v []byte) error
func (*TJSONProtocol) WriteBool ¶
func (p *TJSONProtocol) WriteBool(b bool) error
func (*TJSONProtocol) WriteByte ¶
func (p *TJSONProtocol) WriteByte(b int8) error
func (*TJSONProtocol) WriteDouble ¶
func (p *TJSONProtocol) WriteDouble(v float64) error
func (*TJSONProtocol) WriteFieldBegin ¶
func (p *TJSONProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
func (*TJSONProtocol) WriteFieldEnd ¶
func (p *TJSONProtocol) WriteFieldEnd() error
func (*TJSONProtocol) WriteFieldStop ¶
func (p *TJSONProtocol) WriteFieldStop() error
func (*TJSONProtocol) WriteI16 ¶
func (p *TJSONProtocol) WriteI16(v int16) error
func (*TJSONProtocol) WriteI32 ¶
func (p *TJSONProtocol) WriteI32(v int32) error
func (*TJSONProtocol) WriteI64 ¶
func (p *TJSONProtocol) WriteI64(v int64) error
func (*TJSONProtocol) WriteListBegin ¶
func (p *TJSONProtocol) WriteListBegin(elemType TType, size int) error
func (*TJSONProtocol) WriteListEnd ¶
func (p *TJSONProtocol) WriteListEnd() error
func (*TJSONProtocol) WriteMapBegin ¶
func (p *TJSONProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
func (*TJSONProtocol) WriteMapEnd ¶
func (p *TJSONProtocol) WriteMapEnd() error
func (*TJSONProtocol) WriteMessageBegin ¶
func (p *TJSONProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error
func (*TJSONProtocol) WriteMessageEnd ¶
func (p *TJSONProtocol) WriteMessageEnd() error
func (*TJSONProtocol) WriteSetBegin ¶
func (p *TJSONProtocol) WriteSetBegin(elemType TType, size int) error
func (*TJSONProtocol) WriteSetEnd ¶
func (p *TJSONProtocol) WriteSetEnd() error
func (*TJSONProtocol) WriteString ¶
func (p *TJSONProtocol) WriteString(v string) error
func (*TJSONProtocol) WriteStructBegin ¶
func (p *TJSONProtocol) WriteStructBegin(name string) error
func (*TJSONProtocol) WriteStructEnd ¶
func (p *TJSONProtocol) WriteStructEnd() error
type TJSONProtocolFactory ¶
type TJSONProtocolFactory struct{}
Factory
func NewTJSONProtocolFactory ¶
func NewTJSONProtocolFactory() *TJSONProtocolFactory
func (*TJSONProtocolFactory) GetProtocol ¶
func (p *TJSONProtocolFactory) GetProtocol(trans TTransport) TProtocol
type TMemoryBuffer ¶
Memory buffer-based implementation of the TTransport interface.
func NewTMemoryBuffer ¶
func NewTMemoryBuffer() *TMemoryBuffer
func NewTMemoryBufferLen ¶
func NewTMemoryBufferLen(size int) *TMemoryBuffer
func (*TMemoryBuffer) Close ¶
func (p *TMemoryBuffer) Close() error
func (*TMemoryBuffer) Flush ¶
func (p *TMemoryBuffer) Flush() error
Flushing a memory buffer is a no-op
func (*TMemoryBuffer) IsOpen ¶
func (p *TMemoryBuffer) IsOpen() bool
func (*TMemoryBuffer) Open ¶
func (p *TMemoryBuffer) Open() error
func (*TMemoryBuffer) RemainingBytes ¶
func (p *TMemoryBuffer) RemainingBytes() (num_bytes uint64)
type TMemoryBufferTransportFactory ¶
type TMemoryBufferTransportFactory struct {
// contains filtered or unexported fields
}
func NewTMemoryBufferTransportFactory ¶
func NewTMemoryBufferTransportFactory(size int) *TMemoryBufferTransportFactory
func (*TMemoryBufferTransportFactory) GetTransport ¶
func (p *TMemoryBufferTransportFactory) GetTransport(trans TTransport) (TTransport, error)
type TMessageType ¶
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 ¶
type TMultiplexedProcessor struct { DefaultProcessor TProcessor // contains filtered or unexported fields }
func NewTMultiplexedProcessor ¶
func NewTMultiplexedProcessor() *TMultiplexedProcessor
func (*TMultiplexedProcessor) Process ¶
func (t *TMultiplexedProcessor) Process(ctx context.Context, in, out TProtocol) (bool, TException)
func (*TMultiplexedProcessor) RegisterDefault ¶
func (t *TMultiplexedProcessor) RegisterDefault(processor TProcessor)
func (*TMultiplexedProcessor) RegisterProcessor ¶
func (t *TMultiplexedProcessor) RegisterProcessor(name string, processor TProcessor)
type TMultiplexedProtocol ¶
type TMultiplexedProtocol struct { TProtocol // contains filtered or unexported fields }
func NewTMultiplexedProtocol ¶
func NewTMultiplexedProtocol(protocol TProtocol, serviceName string) *TMultiplexedProtocol
func (*TMultiplexedProtocol) WriteMessageBegin ¶
func (t *TMultiplexedProtocol) WriteMessageBegin(name string, typeId TMessageType, seqid int32) error
type TProcessor ¶
type TProcessor interface {
Process(ctx context.Context, 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 ¶
type TProcessorFactory interface {
GetProcessor(trans TTransport) TProcessor
}
The default processor factory just returns a singleton instance.
func NewTProcessorFactory ¶
func NewTProcessorFactory(p TProcessor) TProcessorFactory
type TProcessorFunction ¶
type TProcessorFunctionFactory ¶
type TProcessorFunctionFactory interface {
GetProcessorFunction(trans TTransport) TProcessorFunction
}
*
- The default processor factory just returns a singleton
- instance.
func NewTProcessorFunctionFactory ¶
func NewTProcessorFunctionFactory(p TProcessorFunction) TProcessorFunctionFactory
type TProtocol ¶
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 ¶
type TProtocolException interface { TException TypeId() int }
Thrift Protocol exception
func NewTProtocolException ¶
func NewTProtocolException(err error) TProtocolException
func NewTProtocolExceptionWithType ¶
func NewTProtocolExceptionWithType(errType int, err error) TProtocolException
type TProtocolFactory ¶
type TProtocolFactory interface {
GetProtocol(trans TTransport) TProtocol
}
Factory interface for constructing protocol instances.
type TRichTransport ¶
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 ¶
type TSSLServerSocket struct {
// contains filtered or unexported fields
}
func NewTSSLServerSocket ¶
func NewTSSLServerSocket(listenAddr string, cfg *tls.Config) (*TSSLServerSocket, error)
func (*TSSLServerSocket) Accept ¶
func (p *TSSLServerSocket) Accept() (TTransport, error)
func (*TSSLServerSocket) Addr ¶
func (p *TSSLServerSocket) Addr() net.Addr
func (*TSSLServerSocket) Close ¶
func (p *TSSLServerSocket) Close() error
func (*TSSLServerSocket) Interrupt ¶
func (p *TSSLServerSocket) Interrupt() error
func (*TSSLServerSocket) IsListening ¶
func (p *TSSLServerSocket) IsListening() bool
Checks whether the socket is listening.
func (*TSSLServerSocket) Listen ¶
func (p *TSSLServerSocket) Listen() error
func (*TSSLServerSocket) Open ¶
func (p *TSSLServerSocket) Open() error
Connects the socket, creating a new socket object if necessary.
type TSSLSocket ¶
type TSSLSocket struct {
// contains filtered or unexported fields
}
func NewTSSLSocket ¶
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 ¶
func NewTSSLSocketFromAddrTimeout(addr net.Addr, cfg *tls.Config, timeout time.Duration) *TSSLSocket
Creates a TSSLSocket from a net.Addr
func NewTSSLSocketFromConnTimeout ¶
func NewTSSLSocketFromConnTimeout(conn net.Conn, cfg *tls.Config, timeout time.Duration) *TSSLSocket
Creates a TSSLSocket from an existing net.Conn
func NewTSSLSocketTimeout ¶
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) Flush ¶
func (p *TSSLSocket) Flush() error
func (*TSSLSocket) Interrupt ¶
func (p *TSSLSocket) Interrupt() error
func (*TSSLSocket) IsOpen ¶
func (p *TSSLSocket) IsOpen() bool
Returns true if the connection is open
func (*TSSLSocket) Open ¶
func (p *TSSLSocket) Open() error
Connects the socket, creating a new socket object if necessary.
func (*TSSLSocket) RemainingBytes ¶
func (p *TSSLSocket) RemainingBytes() (num_bytes uint64)
func (*TSSLSocket) SetTimeout ¶
func (p *TSSLSocket) SetTimeout(timeout time.Duration) error
Sets the socket timeout
type TSerializer ¶
type TSerializer struct { Transport *TMemoryBuffer Protocol TProtocol }
func NewTSerializer ¶
func NewTSerializer() *TSerializer
func (*TSerializer) WriteString ¶
func (t *TSerializer) WriteString(msg TStruct) (s string, err error)
type TServer ¶
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 ¶
type TServerSocket struct {
// contains filtered or unexported fields
}
func NewTServerSocket ¶
func NewTServerSocket(listenAddr string) (*TServerSocket, error)
func NewTServerSocketFromAddrTimeout ¶
func NewTServerSocketFromAddrTimeout(addr net.Addr, clientTimeout time.Duration) *TServerSocket
Creates a TServerSocket from a net.Addr
func NewTServerSocketTimeout ¶
func NewTServerSocketTimeout(listenAddr string, clientTimeout time.Duration) (*TServerSocket, error)
func (*TServerSocket) Accept ¶
func (p *TServerSocket) Accept() (TTransport, error)
func (*TServerSocket) Addr ¶
func (p *TServerSocket) Addr() net.Addr
func (*TServerSocket) Close ¶
func (p *TServerSocket) Close() error
func (*TServerSocket) Interrupt ¶
func (p *TServerSocket) Interrupt() error
func (*TServerSocket) IsListening ¶
func (p *TServerSocket) IsListening() bool
Checks whether the socket is listening.
func (*TServerSocket) Listen ¶
func (p *TServerSocket) Listen() error
func (*TServerSocket) Open ¶
func (p *TServerSocket) Open() error
Connects the socket, creating a new socket object if necessary.
type TServerTransport ¶
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 ¶
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 ¶
func NewTSimpleJSONProtocol(t TTransport) *TSimpleJSONProtocol
Constructor
func (*TSimpleJSONProtocol) Flush ¶
func (p *TSimpleJSONProtocol) Flush() (err error)
func (*TSimpleJSONProtocol) OutputBool ¶
func (p *TSimpleJSONProtocol) OutputBool(value bool) error
func (*TSimpleJSONProtocol) OutputElemListBegin ¶
func (p *TSimpleJSONProtocol) OutputElemListBegin(elemType TType, size int) error
func (*TSimpleJSONProtocol) OutputF64 ¶
func (p *TSimpleJSONProtocol) OutputF64(value float64) error
func (*TSimpleJSONProtocol) OutputI64 ¶
func (p *TSimpleJSONProtocol) OutputI64(value int64) error
func (*TSimpleJSONProtocol) OutputListBegin ¶
func (p *TSimpleJSONProtocol) OutputListBegin() error
func (*TSimpleJSONProtocol) OutputListEnd ¶
func (p *TSimpleJSONProtocol) OutputListEnd() error
func (*TSimpleJSONProtocol) OutputNull ¶
func (p *TSimpleJSONProtocol) OutputNull() error
func (*TSimpleJSONProtocol) OutputObjectBegin ¶
func (p *TSimpleJSONProtocol) OutputObjectBegin() error
func (*TSimpleJSONProtocol) OutputObjectEnd ¶
func (p *TSimpleJSONProtocol) OutputObjectEnd() error
func (*TSimpleJSONProtocol) OutputPostValue ¶
func (p *TSimpleJSONProtocol) OutputPostValue() error
func (*TSimpleJSONProtocol) OutputPreValue ¶
func (p *TSimpleJSONProtocol) OutputPreValue() error
func (*TSimpleJSONProtocol) OutputString ¶
func (p *TSimpleJSONProtocol) OutputString(s string) error
func (*TSimpleJSONProtocol) OutputStringData ¶
func (p *TSimpleJSONProtocol) OutputStringData(s string) error
func (*TSimpleJSONProtocol) ParseBase64EncodedBody ¶
func (p *TSimpleJSONProtocol) ParseBase64EncodedBody() ([]byte, error)
func (*TSimpleJSONProtocol) ParseElemListBegin ¶
func (p *TSimpleJSONProtocol) ParseElemListBegin() (elemType TType, size int, e error)
func (*TSimpleJSONProtocol) ParseF64 ¶
func (p *TSimpleJSONProtocol) ParseF64() (float64, bool, error)
func (*TSimpleJSONProtocol) ParseI64 ¶
func (p *TSimpleJSONProtocol) ParseI64() (int64, bool, error)
func (*TSimpleJSONProtocol) ParseListBegin ¶
func (p *TSimpleJSONProtocol) ParseListBegin() (isNull bool, err error)
func (*TSimpleJSONProtocol) ParseListEnd ¶
func (p *TSimpleJSONProtocol) ParseListEnd() error
func (*TSimpleJSONProtocol) ParseObjectEnd ¶
func (p *TSimpleJSONProtocol) ParseObjectEnd() error
func (*TSimpleJSONProtocol) ParseObjectStart ¶
func (p *TSimpleJSONProtocol) ParseObjectStart() (bool, error)
func (*TSimpleJSONProtocol) ParsePostValue ¶
func (p *TSimpleJSONProtocol) ParsePostValue() error
func (*TSimpleJSONProtocol) ParsePreValue ¶
func (p *TSimpleJSONProtocol) ParsePreValue() error
func (*TSimpleJSONProtocol) ParseQuotedStringBody ¶
func (p *TSimpleJSONProtocol) ParseQuotedStringBody() (string, error)
func (*TSimpleJSONProtocol) ParseStringBody ¶
func (p *TSimpleJSONProtocol) ParseStringBody() (string, error)
func (*TSimpleJSONProtocol) ReadBinary ¶
func (p *TSimpleJSONProtocol) ReadBinary() ([]byte, error)
func (*TSimpleJSONProtocol) ReadBool ¶
func (p *TSimpleJSONProtocol) ReadBool() (bool, error)
func (*TSimpleJSONProtocol) ReadByte ¶
func (p *TSimpleJSONProtocol) ReadByte() (int8, error)
func (*TSimpleJSONProtocol) ReadDouble ¶
func (p *TSimpleJSONProtocol) ReadDouble() (float64, error)
func (*TSimpleJSONProtocol) ReadFieldBegin ¶
func (p *TSimpleJSONProtocol) ReadFieldBegin() (string, TType, int16, error)
func (*TSimpleJSONProtocol) ReadFieldEnd ¶
func (p *TSimpleJSONProtocol) ReadFieldEnd() error
func (*TSimpleJSONProtocol) ReadI16 ¶
func (p *TSimpleJSONProtocol) ReadI16() (int16, error)
func (*TSimpleJSONProtocol) ReadI32 ¶
func (p *TSimpleJSONProtocol) ReadI32() (int32, error)
func (*TSimpleJSONProtocol) ReadI64 ¶
func (p *TSimpleJSONProtocol) ReadI64() (int64, error)
func (*TSimpleJSONProtocol) ReadListBegin ¶
func (p *TSimpleJSONProtocol) ReadListBegin() (elemType TType, size int, e error)
func (*TSimpleJSONProtocol) ReadListEnd ¶
func (p *TSimpleJSONProtocol) ReadListEnd() error
func (*TSimpleJSONProtocol) ReadMapBegin ¶
func (p *TSimpleJSONProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, e error)
func (*TSimpleJSONProtocol) ReadMapEnd ¶
func (p *TSimpleJSONProtocol) ReadMapEnd() error
func (*TSimpleJSONProtocol) ReadMessageBegin ¶
func (p *TSimpleJSONProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error)
Reading methods.
func (*TSimpleJSONProtocol) ReadMessageEnd ¶
func (p *TSimpleJSONProtocol) ReadMessageEnd() error
func (*TSimpleJSONProtocol) ReadSetBegin ¶
func (p *TSimpleJSONProtocol) ReadSetBegin() (elemType TType, size int, e error)
func (*TSimpleJSONProtocol) ReadSetEnd ¶
func (p *TSimpleJSONProtocol) ReadSetEnd() error
func (*TSimpleJSONProtocol) ReadString ¶
func (p *TSimpleJSONProtocol) ReadString() (string, error)
func (*TSimpleJSONProtocol) ReadStructBegin ¶
func (p *TSimpleJSONProtocol) ReadStructBegin() (name string, err error)
func (*TSimpleJSONProtocol) ReadStructEnd ¶
func (p *TSimpleJSONProtocol) ReadStructEnd() error
func (*TSimpleJSONProtocol) Skip ¶
func (p *TSimpleJSONProtocol) Skip(fieldType TType) (err error)
func (*TSimpleJSONProtocol) Transport ¶
func (p *TSimpleJSONProtocol) Transport() TTransport
func (*TSimpleJSONProtocol) WriteBinary ¶
func (p *TSimpleJSONProtocol) WriteBinary(v []byte) error
func (*TSimpleJSONProtocol) WriteBool ¶
func (p *TSimpleJSONProtocol) WriteBool(b bool) error
func (*TSimpleJSONProtocol) WriteByte ¶
func (p *TSimpleJSONProtocol) WriteByte(b int8) error
func (*TSimpleJSONProtocol) WriteDouble ¶
func (p *TSimpleJSONProtocol) WriteDouble(v float64) error
func (*TSimpleJSONProtocol) WriteFieldBegin ¶
func (p *TSimpleJSONProtocol) WriteFieldBegin(name string, typeId TType, id int16) error
func (*TSimpleJSONProtocol) WriteFieldEnd ¶
func (p *TSimpleJSONProtocol) WriteFieldEnd() error
func (*TSimpleJSONProtocol) WriteFieldStop ¶
func (p *TSimpleJSONProtocol) WriteFieldStop() error
func (*TSimpleJSONProtocol) WriteI16 ¶
func (p *TSimpleJSONProtocol) WriteI16(v int16) error
func (*TSimpleJSONProtocol) WriteI32 ¶
func (p *TSimpleJSONProtocol) WriteI32(v int32) error
func (*TSimpleJSONProtocol) WriteI64 ¶
func (p *TSimpleJSONProtocol) WriteI64(v int64) error
func (*TSimpleJSONProtocol) WriteListBegin ¶
func (p *TSimpleJSONProtocol) WriteListBegin(elemType TType, size int) error
func (*TSimpleJSONProtocol) WriteListEnd ¶
func (p *TSimpleJSONProtocol) WriteListEnd() error
func (*TSimpleJSONProtocol) WriteMapBegin ¶
func (p *TSimpleJSONProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error
func (*TSimpleJSONProtocol) WriteMapEnd ¶
func (p *TSimpleJSONProtocol) WriteMapEnd() error
func (*TSimpleJSONProtocol) WriteMessageBegin ¶
func (p *TSimpleJSONProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error
func (*TSimpleJSONProtocol) WriteMessageEnd ¶
func (p *TSimpleJSONProtocol) WriteMessageEnd() error
func (*TSimpleJSONProtocol) WriteSetBegin ¶
func (p *TSimpleJSONProtocol) WriteSetBegin(elemType TType, size int) error
func (*TSimpleJSONProtocol) WriteSetEnd ¶
func (p *TSimpleJSONProtocol) WriteSetEnd() error
func (*TSimpleJSONProtocol) WriteString ¶
func (p *TSimpleJSONProtocol) WriteString(v string) error
func (*TSimpleJSONProtocol) WriteStructBegin ¶
func (p *TSimpleJSONProtocol) WriteStructBegin(name string) error
func (*TSimpleJSONProtocol) WriteStructEnd ¶
func (p *TSimpleJSONProtocol) WriteStructEnd() error
type TSimpleJSONProtocolFactory ¶
type TSimpleJSONProtocolFactory struct{}
Factory
func NewTSimpleJSONProtocolFactory ¶
func NewTSimpleJSONProtocolFactory() *TSimpleJSONProtocolFactory
func (*TSimpleJSONProtocolFactory) GetProtocol ¶
func (p *TSimpleJSONProtocolFactory) GetProtocol(trans TTransport) TProtocol
type TSimpleServer ¶
type TSimpleServer struct {
// contains filtered or unexported fields
}
* This is not a typical TSimpleServer as it is not blocked after accept a socket. * It is more like a TThreadedServer that can handle different connections in different goroutines. * This will work if golang user implements a conn-pool like thing in client side.
func NewTSimpleServer2 ¶
func NewTSimpleServer2(processor TProcessor, serverTransport TServerTransport) *TSimpleServer
func NewTSimpleServer4 ¶
func NewTSimpleServer4(processor TProcessor, serverTransport TServerTransport, transportFactory TTransportFactory, protocolFactory TProtocolFactory) *TSimpleServer
func NewTSimpleServer6 ¶
func NewTSimpleServer6(processor TProcessor, serverTransport TServerTransport, inputTransportFactory TTransportFactory, outputTransportFactory TTransportFactory, inputProtocolFactory TProtocolFactory, outputProtocolFactory TProtocolFactory) *TSimpleServer
func NewTSimpleServerFactory2 ¶
func NewTSimpleServerFactory2(processorFactory TProcessorFactory, serverTransport TServerTransport) *TSimpleServer
func NewTSimpleServerFactory4 ¶
func NewTSimpleServerFactory4(processorFactory TProcessorFactory, serverTransport TServerTransport, transportFactory TTransportFactory, protocolFactory TProtocolFactory) *TSimpleServer
func NewTSimpleServerFactory6 ¶
func NewTSimpleServerFactory6(processorFactory TProcessorFactory, serverTransport TServerTransport, inputTransportFactory TTransportFactory, outputTransportFactory TTransportFactory, inputProtocolFactory TProtocolFactory, outputProtocolFactory TProtocolFactory) *TSimpleServer
func (*TSimpleServer) AcceptLoop ¶
func (p *TSimpleServer) AcceptLoop() error
func (*TSimpleServer) InputProtocolFactory ¶
func (p *TSimpleServer) InputProtocolFactory() TProtocolFactory
func (*TSimpleServer) InputTransportFactory ¶
func (p *TSimpleServer) InputTransportFactory() TTransportFactory
func (*TSimpleServer) Listen ¶
func (p *TSimpleServer) Listen() error
func (*TSimpleServer) OutputProtocolFactory ¶
func (p *TSimpleServer) OutputProtocolFactory() TProtocolFactory
func (*TSimpleServer) OutputTransportFactory ¶
func (p *TSimpleServer) OutputTransportFactory() TTransportFactory
func (*TSimpleServer) ProcessorFactory ¶
func (p *TSimpleServer) ProcessorFactory() TProcessorFactory
func (*TSimpleServer) Serve ¶
func (p *TSimpleServer) Serve() error
func (*TSimpleServer) ServerTransport ¶
func (p *TSimpleServer) ServerTransport() TServerTransport
func (*TSimpleServer) Stop ¶
func (p *TSimpleServer) Stop() error
type TSocket ¶
type TSocket struct {
// contains filtered or unexported fields
}
func NewTSocket ¶
NewTSocket creates a net.Conn-backed TTransport, given a host and port
Example:
trans, err := thrift.NewTSocket("localhost:9090")
func NewTSocketFromAddrTimeout ¶
Creates a TSocket from a net.Addr
func NewTSocketFromConnTimeout ¶
Creates a TSocket from an existing net.Conn
func NewTSocketTimeout ¶
NewTSocketTimeout creates a net.Conn-backed TTransport, given a host and port it also accepts a timeout as a time.Duration
func (*TSocket) RemainingBytes ¶
func (*TSocket) SetTimeout ¶
Sets the socket timeout
type TStandardClient ¶
type TStandardClient struct {
// contains filtered or unexported fields
}
func NewTStandardClient ¶
func NewTStandardClient(inputProtocol, outputProtocol TProtocol) *TStandardClient
TStandardClient implements TClient, and uses the standard message format for Thrift. It is not safe for concurrent use.
type TTransport ¶
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 ¶
func NewTHttpClient(urlstr string) (TTransport, error)
func NewTHttpClientWithOptions ¶
func NewTHttpClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error)
func NewTHttpPostClient
deprecated
func NewTHttpPostClient(urlstr string) (TTransport, error)
Deprecated: Use NewTHttpClient instead.
func NewTHttpPostClientWithOptions
deprecated
func NewTHttpPostClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error)
Deprecated: Use NewTHttpClientWithOptions instead.
type TTransportException ¶
type TTransportException interface { TException TypeId() int Err() error }
Thrift Transport exception
func NewTTransportException ¶
func NewTTransportException(t int, e string) TTransportException
func NewTTransportExceptionFromError ¶
func NewTTransportExceptionFromError(e error) TTransportException
type TTransportFactory ¶
type TTransportFactory interface {
GetTransport(trans TTransport) (TTransport, error)
}
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 ¶
func NewTFramedTransportFactory(factory TTransportFactory) TTransportFactory
func NewTFramedTransportFactoryMaxLength ¶
func NewTFramedTransportFactoryMaxLength(factory TTransportFactory, maxLength uint32) TTransportFactory
func NewTHeaderTransportFactory ¶
func NewTHeaderTransportFactory(factory TTransportFactory) TTransportFactory
func NewTTransportFactory ¶
func NewTTransportFactory() TTransportFactory
type TZlibTransport ¶
type TZlibTransport struct {
// contains filtered or unexported fields
}
TZlibTransport is a TTransport implementation that makes use of zlib compression.
func NewTZlibTransport ¶
func NewTZlibTransport(trans TTransport, level int) (*TZlibTransport, error)
NewTZlibTransport constructs a new instance of TZlibTransport
func (*TZlibTransport) Close ¶
func (z *TZlibTransport) Close() error
Close closes the reader and writer (flushing any unwritten data) and closes the underlying transport.
func (*TZlibTransport) Flush ¶
func (z *TZlibTransport) Flush() error
Flush flushes the writer and its underlying transport.
func (*TZlibTransport) IsOpen ¶
func (z *TZlibTransport) IsOpen() bool
IsOpen returns true if the transport is open
func (*TZlibTransport) Open ¶
func (z *TZlibTransport) Open() error
Open opens the transport for communication
func (*TZlibTransport) RemainingBytes ¶
func (z *TZlibTransport) RemainingBytes() uint64
RemainingBytes returns the size in bytes of the data that is still to be read.
type TZlibTransportFactory ¶
type TZlibTransportFactory struct {
// contains filtered or unexported fields
}
TZlibTransportFactory is a factory for TZlibTransport instances
func NewTZlibTransportFactory ¶
func NewTZlibTransportFactory(level int) *TZlibTransportFactory
NewTZlibTransportFactory constructs a new instance of NewTZlibTransportFactory
func NewTZlibTransportFactoryWithFactory ¶
func NewTZlibTransportFactoryWithFactory(level int, factory TTransportFactory) *TZlibTransportFactory
NewTZlibTransportFactory constructs a new instance of TZlibTransportFactory as a wrapper over existing transport factory
func (*TZlibTransportFactory) GetTransport ¶
func (p *TZlibTransportFactory) GetTransport(trans TTransport) (TTransport, error)
GetTransport constructs a new instance of NewTZlibTransport
type TransformID ¶
type TransformID uint32
TransformID Numerical ID of transform function
const ( // TransformNone Default null transform TransformNone TransformID = 0 // TransformZlib Apply zlib compression TransformZlib TransformID = 1 // TransformHMAC Deprecated and no longer supported TransformHMAC TransformID = 2 // TransformSnappy Apply snappy compression TransformSnappy TransformID = 3 // TransformQLZ Deprecated and no longer supported TransformQLZ TransformID = 4 // TransformZstd Apply zstd compression TransformZstd TransformID = 5 )
func (TransformID) String ¶
func (c TransformID) String() string
func (TransformID) Untransformer ¶
func (c TransformID) Untransformer() (func(byteReader) (byteReader, error), error)
Untransformer will find a transform function to wrap a reader with to transformed the data.
Source Files ¶
- application_exception.go
- binary_protocol.go
- buffered_transport.go
- client.go
- client_go17.go
- common_test_go17.go
- compact_protocol.go
- debug_protocol.go
- deserializer.go
- exception.go
- field.go
- framed_transport.go
- go17.go
- header.go
- header_protocol.go
- header_transport.go
- http_client.go
- http_transport.go
- http_transport_go17.go
- iostream_transport.go
- json_protocol.go
- memory_buffer.go
- messagetype.go
- multiplexed_protocol.go
- multiplexed_protocol_go17.go
- numeric.go
- pointerize.go
- processor_factory.go
- processor_go17.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