test

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package test is generated code used to make or handle TChannel calls using Thrift.

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int
View Source
var SecondServiceEchoResult_Success_DEFAULT string

Functions

func NewTChanSecondServiceInheritedClient

func NewTChanSecondServiceInheritedClient(thriftService string, client thrift.TChanClient) *tchanSecondServiceClient

func NewTChanSecondServiceServer

func NewTChanSecondServiceServer(handler TChanSecondService) thrift.TChanServer

NewTChanSecondServiceServer wraps a handler for TChanSecondService so it can be registered with a thrift.Server.

func NewTChanSimpleServiceInheritedClient

func NewTChanSimpleServiceInheritedClient(thriftService string, client thrift.TChanClient) *tchanSimpleServiceClient

func NewTChanSimpleServiceServer

func NewTChanSimpleServiceServer(handler TChanSimpleService) thrift.TChanServer

NewTChanSimpleServiceServer wraps a handler for TChanSimpleService so it can be registered with a thrift.Server.

Types

type Data

type Data struct {
	B1 bool   `thrift:"b1,1" json:"b1"`
	S2 string `thrift:"s2,2" json:"s2"`
	I3 int32  `thrift:"i3,3" json:"i3"`
}

Attributes:

  • B1
  • S2
  • I3
var SimpleServiceCallArgs_Arg_DEFAULT *Data
var SimpleServiceCallResult_Success_DEFAULT *Data

func NewData

func NewData() *Data

func (*Data) GetB1

func (p *Data) GetB1() bool

func (*Data) GetI3

func (p *Data) GetI3() int32

func (*Data) GetS2

func (p *Data) GetS2() string

func (*Data) Read

func (p *Data) Read(iprot thrift.TProtocol) error

func (*Data) String

func (p *Data) String() string

func (*Data) Write

func (p *Data) Write(oprot thrift.TProtocol) error

type SecondService

type SecondService interface {
	// Parameters:
	//  - Arg
	Echo(arg string) (r string, err error)
}

type SecondServiceClient

type SecondServiceClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

func NewSecondServiceClientProtocol

func NewSecondServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *SecondServiceClient

func (*SecondServiceClient) Echo

func (p *SecondServiceClient) Echo(arg string) (r string, err error)

Parameters:

  • Arg

type SecondServiceEchoArgs

type SecondServiceEchoArgs struct {
	Arg string `thrift:"arg,1" json:"arg"`
}

Attributes:

  • Arg

func NewSecondServiceEchoArgs

func NewSecondServiceEchoArgs() *SecondServiceEchoArgs

func (*SecondServiceEchoArgs) GetArg

func (p *SecondServiceEchoArgs) GetArg() string

func (*SecondServiceEchoArgs) Read

func (*SecondServiceEchoArgs) String

func (p *SecondServiceEchoArgs) String() string

func (*SecondServiceEchoArgs) Write

func (p *SecondServiceEchoArgs) Write(oprot thrift.TProtocol) error

type SecondServiceEchoResult

type SecondServiceEchoResult struct {
	Success *string `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewSecondServiceEchoResult

func NewSecondServiceEchoResult() *SecondServiceEchoResult

func (*SecondServiceEchoResult) GetSuccess

func (p *SecondServiceEchoResult) GetSuccess() string

func (*SecondServiceEchoResult) IsSetSuccess

func (p *SecondServiceEchoResult) IsSetSuccess() bool

func (*SecondServiceEchoResult) Read

func (*SecondServiceEchoResult) String

func (p *SecondServiceEchoResult) String() string

func (*SecondServiceEchoResult) Write

type SecondServiceProcessor

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

func NewSecondServiceProcessor

func NewSecondServiceProcessor(handler SecondService) *SecondServiceProcessor

func (*SecondServiceProcessor) AddToProcessorMap

func (p *SecondServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*SecondServiceProcessor) GetProcessorFunction

func (p *SecondServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*SecondServiceProcessor) Process

func (p *SecondServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*SecondServiceProcessor) ProcessorMap

type SimpleErr

type SimpleErr struct {
	Message string `thrift:"message,1" json:"message"`
}

Attributes:

  • Message
var SimpleServiceSimpleResult_SimpleErr_DEFAULT *SimpleErr

func NewSimpleErr

func NewSimpleErr() *SimpleErr

func (*SimpleErr) Error

func (p *SimpleErr) Error() string

func (*SimpleErr) GetMessage

func (p *SimpleErr) GetMessage() string

func (*SimpleErr) Read

func (p *SimpleErr) Read(iprot thrift.TProtocol) error

func (*SimpleErr) String

func (p *SimpleErr) String() string

func (*SimpleErr) Write

func (p *SimpleErr) Write(oprot thrift.TProtocol) error

type SimpleService

type SimpleService interface {
	// Parameters:
	//  - Arg
	Call(arg *Data) (r *Data, err error)
	Simple() (err error)
}

type SimpleServiceCallArgs

type SimpleServiceCallArgs struct {
	Arg *Data `thrift:"arg,1" json:"arg"`
}

Attributes:

  • Arg

func NewSimpleServiceCallArgs

func NewSimpleServiceCallArgs() *SimpleServiceCallArgs

func (*SimpleServiceCallArgs) GetArg

func (p *SimpleServiceCallArgs) GetArg() *Data

func (*SimpleServiceCallArgs) IsSetArg

func (p *SimpleServiceCallArgs) IsSetArg() bool

func (*SimpleServiceCallArgs) Read

func (*SimpleServiceCallArgs) String

func (p *SimpleServiceCallArgs) String() string

func (*SimpleServiceCallArgs) Write

func (p *SimpleServiceCallArgs) Write(oprot thrift.TProtocol) error

type SimpleServiceCallResult

type SimpleServiceCallResult struct {
	Success *Data `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewSimpleServiceCallResult

func NewSimpleServiceCallResult() *SimpleServiceCallResult

func (*SimpleServiceCallResult) GetSuccess

func (p *SimpleServiceCallResult) GetSuccess() *Data

func (*SimpleServiceCallResult) IsSetSuccess

func (p *SimpleServiceCallResult) IsSetSuccess() bool

func (*SimpleServiceCallResult) Read

func (*SimpleServiceCallResult) String

func (p *SimpleServiceCallResult) String() string

func (*SimpleServiceCallResult) Write

type SimpleServiceClient

type SimpleServiceClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

func NewSimpleServiceClientProtocol

func NewSimpleServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *SimpleServiceClient

func (*SimpleServiceClient) Call

func (p *SimpleServiceClient) Call(arg *Data) (r *Data, err error)

Parameters:

  • Arg

func (*SimpleServiceClient) Simple

func (p *SimpleServiceClient) Simple() (err error)

type SimpleServiceProcessor

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

func NewSimpleServiceProcessor

func NewSimpleServiceProcessor(handler SimpleService) *SimpleServiceProcessor

func (*SimpleServiceProcessor) AddToProcessorMap

func (p *SimpleServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*SimpleServiceProcessor) GetProcessorFunction

func (p *SimpleServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*SimpleServiceProcessor) Process

func (p *SimpleServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*SimpleServiceProcessor) ProcessorMap

type SimpleServiceSimpleArgs

type SimpleServiceSimpleArgs struct {
}

func NewSimpleServiceSimpleArgs

func NewSimpleServiceSimpleArgs() *SimpleServiceSimpleArgs

func (*SimpleServiceSimpleArgs) Read

func (*SimpleServiceSimpleArgs) String

func (p *SimpleServiceSimpleArgs) String() string

func (*SimpleServiceSimpleArgs) Write

type SimpleServiceSimpleResult

type SimpleServiceSimpleResult struct {
	SimpleErr *SimpleErr `thrift:"simpleErr,1" json:"simpleErr,omitempty"`
}

Attributes:

  • SimpleErr

func NewSimpleServiceSimpleResult

func NewSimpleServiceSimpleResult() *SimpleServiceSimpleResult

func (*SimpleServiceSimpleResult) GetSimpleErr

func (p *SimpleServiceSimpleResult) GetSimpleErr() *SimpleErr

func (*SimpleServiceSimpleResult) IsSetSimpleErr

func (p *SimpleServiceSimpleResult) IsSetSimpleErr() bool

func (*SimpleServiceSimpleResult) Read

func (*SimpleServiceSimpleResult) String

func (p *SimpleServiceSimpleResult) String() string

func (*SimpleServiceSimpleResult) Write

type TChanSecondService

type TChanSecondService interface {
	Echo(ctx thrift.Context, arg string) (string, error)
}

TChanSecondService is the interface that defines the server handler and client interface.

func NewTChanSecondServiceClient

func NewTChanSecondServiceClient(client thrift.TChanClient) TChanSecondService

NewTChanSecondServiceClient creates a client that can be used to make remote calls.

type TChanSimpleService

type TChanSimpleService interface {
	Call(ctx thrift.Context, arg *Data) (*Data, error)
	Simple(ctx thrift.Context) error
}

TChanSimpleService is the interface that defines the server handler and client interface.

func NewTChanSimpleServiceClient

func NewTChanSimpleServiceClient(client thrift.TChanClient) TChanSimpleService

NewTChanSimpleServiceClient creates a client that can be used to make remote calls.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL