Documentation ¶
Overview ¶
Package driver is generated code used to make or handle TChannel calls using Thrift.
Index ¶
- Variables
- func NewTChanDriverInheritedClient(thriftService string, client thrift.TChanClient) *tchanDriverClient
- func NewTChanDriverServer(handler TChanDriver) thrift.TChanServer
- type Driver
- type DriverClient
- type DriverFindNearestArgs
- type DriverFindNearestResult
- func (p *DriverFindNearestResult) GetSuccess() []*DriverLocation
- func (p *DriverFindNearestResult) IsSetSuccess() bool
- func (p *DriverFindNearestResult) Read(iprot thrift.TProtocol) error
- func (p *DriverFindNearestResult) String() string
- func (p *DriverFindNearestResult) Write(oprot thrift.TProtocol) error
- type DriverLocation
- type DriverProcessor
- func (p *DriverProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *DriverProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *DriverProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *DriverProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
- type TChanDriver
Constants ¶
This section is empty.
Variables ¶
View Source
var DriverFindNearestResult_Success_DEFAULT []*DriverLocation
View Source
var GoUnusedProtection__ int
Functions ¶
func NewTChanDriverInheritedClient ¶
func NewTChanDriverInheritedClient(thriftService string, client thrift.TChanClient) *tchanDriverClient
func NewTChanDriverServer ¶
func NewTChanDriverServer(handler TChanDriver) thrift.TChanServer
NewTChanDriverServer wraps a handler for TChanDriver so it can be registered with a thrift.Server.
Types ¶
type Driver ¶
type Driver interface { // Parameters: // - Location FindNearest(location string) (r []*DriverLocation, err error) }
type DriverClient ¶
type DriverClient struct { Transport thrift.TTransport ProtocolFactory thrift.TProtocolFactory InputProtocol thrift.TProtocol OutputProtocol thrift.TProtocol SeqId int32 }
func NewDriverClientFactory ¶
func NewDriverClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *DriverClient
func NewDriverClientProtocol ¶
func NewDriverClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *DriverClient
func (*DriverClient) FindNearest ¶
func (p *DriverClient) FindNearest(location string) (r []*DriverLocation, err error)
Parameters:
- Location
type DriverFindNearestArgs ¶
type DriverFindNearestArgs struct {
Location string `thrift:"location,1" json:"location"`
}
Attributes:
- Location
func NewDriverFindNearestArgs ¶
func NewDriverFindNearestArgs() *DriverFindNearestArgs
func (*DriverFindNearestArgs) GetLocation ¶
func (p *DriverFindNearestArgs) GetLocation() string
func (*DriverFindNearestArgs) Read ¶
func (p *DriverFindNearestArgs) Read(iprot thrift.TProtocol) error
func (*DriverFindNearestArgs) String ¶
func (p *DriverFindNearestArgs) String() string
type DriverFindNearestResult ¶
type DriverFindNearestResult struct {
Success []*DriverLocation `thrift:"success,0" json:"success,omitempty"`
}
Attributes:
- Success
func NewDriverFindNearestResult ¶
func NewDriverFindNearestResult() *DriverFindNearestResult
func (*DriverFindNearestResult) GetSuccess ¶
func (p *DriverFindNearestResult) GetSuccess() []*DriverLocation
func (*DriverFindNearestResult) IsSetSuccess ¶
func (p *DriverFindNearestResult) IsSetSuccess() bool
func (*DriverFindNearestResult) Read ¶
func (p *DriverFindNearestResult) Read(iprot thrift.TProtocol) error
func (*DriverFindNearestResult) String ¶
func (p *DriverFindNearestResult) String() string
type DriverLocation ¶
type DriverLocation struct { DriverID string `thrift:"driver_id,1,required" json:"driver_id"` Location string `thrift:"location,2,required" json:"location"` }
Attributes:
- DriverID
- Location
func NewDriverLocation ¶
func NewDriverLocation() *DriverLocation
func (*DriverLocation) GetDriverID ¶
func (p *DriverLocation) GetDriverID() string
func (*DriverLocation) GetLocation ¶
func (p *DriverLocation) GetLocation() string
func (*DriverLocation) String ¶
func (p *DriverLocation) String() string
type DriverProcessor ¶
type DriverProcessor struct {
// contains filtered or unexported fields
}
func NewDriverProcessor ¶
func NewDriverProcessor(handler Driver) *DriverProcessor
func (*DriverProcessor) AddToProcessorMap ¶
func (p *DriverProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
func (*DriverProcessor) GetProcessorFunction ¶
func (p *DriverProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
func (*DriverProcessor) Process ¶
func (p *DriverProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
func (*DriverProcessor) ProcessorMap ¶
func (p *DriverProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
type TChanDriver ¶
type TChanDriver interface {
FindNearest(ctx thrift.Context, location string) ([]*DriverLocation, error)
}
TChanDriver is the interface that defines the server handler and client interface.
func NewTChanDriverClient ¶
func NewTChanDriverClient(client thrift.TChanClient) TChanDriver
NewTChanDriverClient creates a client that can be used to make remote calls.
Click to show internal directories.
Click to hide internal directories.