Documentation ¶
Index ¶
- type MapPartitionServerHandler
- type TSimpleServer
- func NewTSimpleServer2(processor thrift.TProcessor, serverTransport thrift.TServerTransport) *TSimpleServer
- func NewTSimpleServer4(processor thrift.TProcessor, serverTransport thrift.TServerTransport, ...) *TSimpleServer
- func NewTSimpleServer6(processor thrift.TProcessor, serverTransport thrift.TServerTransport, ...) *TSimpleServer
- func NewTSimpleServerFactory2(processorFactory thrift.TProcessorFactory, ...) *TSimpleServer
- func NewTSimpleServerFactory4(processorFactory thrift.TProcessorFactory, ...) *TSimpleServer
- func NewTSimpleServerFactory6(processorFactory thrift.TProcessorFactory, ...) *TSimpleServer
- func Serve(handler hank.PartitionServer, transportFactory thrift.TTransportFactory, ...) (*TSimpleServer, func())
- func (p *TSimpleServer) AcceptLoop() error
- func (p *TSimpleServer) InputProtocolFactory() thrift.TProtocolFactory
- func (p *TSimpleServer) InputTransportFactory() thrift.TTransportFactory
- func (p *TSimpleServer) Listen() error
- func (p *TSimpleServer) OutputProtocolFactory() thrift.TProtocolFactory
- func (p *TSimpleServer) OutputTransportFactory() thrift.TTransportFactory
- func (p *TSimpleServer) ProcessorFactory() thrift.TProcessorFactory
- func (p *TSimpleServer) Serve() error
- func (p *TSimpleServer) ServerTransport() thrift.TServerTransport
- func (p *TSimpleServer) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapPartitionServerHandler ¶
type MapPartitionServerHandler struct { NumRequests int32 // contains filtered or unexported fields }
func NewPartitionServerHandler ¶
func NewPartitionServerHandler(mockData map[string]string) *MapPartitionServerHandler
func (*MapPartitionServerHandler) ClearRequestCounters ¶
func (p *MapPartitionServerHandler) ClearRequestCounters()
func (*MapPartitionServerHandler) Get ¶
func (p *MapPartitionServerHandler) Get(domain_id int32, key []byte) (r *hank.HankResponse, err error)
assume everything is in one domain for testing
func (*MapPartitionServerHandler) GetBulk ¶
func (p *MapPartitionServerHandler) GetBulk(domain_id int32, keys [][]byte) (r *hank.HankBulkResponse, err error)
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 thrift.TProcessor, serverTransport thrift.TServerTransport) *TSimpleServer
func NewTSimpleServer4 ¶
func NewTSimpleServer4(processor thrift.TProcessor, serverTransport thrift.TServerTransport, transportFactory thrift.TTransportFactory, protocolFactory thrift.TProtocolFactory) *TSimpleServer
func NewTSimpleServer6 ¶
func NewTSimpleServer6(processor thrift.TProcessor, serverTransport thrift.TServerTransport, inputTransportFactory thrift.TTransportFactory, outputTransportFactory thrift.TTransportFactory, inputProtocolFactory thrift.TProtocolFactory, outputProtocolFactory thrift.TProtocolFactory) *TSimpleServer
func NewTSimpleServerFactory2 ¶
func NewTSimpleServerFactory2(processorFactory thrift.TProcessorFactory, serverTransport thrift.TServerTransport) *TSimpleServer
func NewTSimpleServerFactory4 ¶
func NewTSimpleServerFactory4(processorFactory thrift.TProcessorFactory, serverTransport thrift.TServerTransport, transportFactory thrift.TTransportFactory, protocolFactory thrift.TProtocolFactory) *TSimpleServer
func NewTSimpleServerFactory6 ¶
func NewTSimpleServerFactory6(processorFactory thrift.TProcessorFactory, serverTransport thrift.TServerTransport, inputTransportFactory thrift.TTransportFactory, outputTransportFactory thrift.TTransportFactory, inputProtocolFactory thrift.TProtocolFactory, outputProtocolFactory thrift.TProtocolFactory) *TSimpleServer
func Serve ¶
func Serve( handler hank.PartitionServer, transportFactory thrift.TTransportFactory, protocolFactory thrift.TProtocolFactory, addr string) (*TSimpleServer, func())
func (*TSimpleServer) AcceptLoop ¶
func (p *TSimpleServer) AcceptLoop() error
func (*TSimpleServer) InputProtocolFactory ¶
func (p *TSimpleServer) InputProtocolFactory() thrift.TProtocolFactory
func (*TSimpleServer) InputTransportFactory ¶
func (p *TSimpleServer) InputTransportFactory() thrift.TTransportFactory
func (*TSimpleServer) Listen ¶
func (p *TSimpleServer) Listen() error
func (*TSimpleServer) OutputProtocolFactory ¶
func (p *TSimpleServer) OutputProtocolFactory() thrift.TProtocolFactory
func (*TSimpleServer) OutputTransportFactory ¶
func (p *TSimpleServer) OutputTransportFactory() thrift.TTransportFactory
func (*TSimpleServer) ProcessorFactory ¶
func (p *TSimpleServer) ProcessorFactory() thrift.TProcessorFactory
func (*TSimpleServer) Serve ¶
func (p *TSimpleServer) Serve() error
func (*TSimpleServer) ServerTransport ¶
func (p *TSimpleServer) ServerTransport() thrift.TServerTransport
func (*TSimpleServer) Stop ¶
func (p *TSimpleServer) Stop() error
Click to show internal directories.
Click to hide internal directories.