test

package
v1.22.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 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 HealthStatus_Message_DEFAULT string
View Source
var SecondServiceEchoResult_Success_DEFAULT string

Functions

func NewTChanMetaInheritedClient added in v1.11.0

func NewTChanMetaInheritedClient(thriftService string, client thrift.TChanClient) *tchanMetaClient

func NewTChanMetaServer added in v1.11.0

func NewTChanMetaServer(handler TChanMeta) thrift.TChanServer

NewTChanMetaServer wraps a handler for TChanMeta so it can be registered with a thrift.Server.

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,required" db:"b1" json:"b1"`
	S2 string `thrift:"s2,2,required" db:"s2" json:"s2"`
	I3 int32  `thrift:"i3,3,required" db:"i3" 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) ReadField1 added in v1.0.8

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

func (*Data) ReadField2 added in v1.0.8

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

func (*Data) ReadField3 added in v1.0.8

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

func (*Data) String

func (p *Data) String() string

func (*Data) Write

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

type HealthStatus added in v1.11.0

type HealthStatus struct {
	Ok      bool    `thrift:"ok,1,required" db:"ok" json:"ok"`
	Message *string `thrift:"message,2" db:"message" json:"message,omitempty"`
}

Attributes:

  • Ok
  • Message
var MetaHealthResult_Success_DEFAULT *HealthStatus

func NewHealthStatus added in v1.11.0

func NewHealthStatus() *HealthStatus

func (*HealthStatus) GetMessage added in v1.11.0

func (p *HealthStatus) GetMessage() string

func (*HealthStatus) GetOk added in v1.11.0

func (p *HealthStatus) GetOk() bool

func (*HealthStatus) IsSetMessage added in v1.11.0

func (p *HealthStatus) IsSetMessage() bool

func (*HealthStatus) Read added in v1.11.0

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

func (*HealthStatus) ReadField1 added in v1.11.0

func (p *HealthStatus) ReadField1(iprot thrift.TProtocol) error

func (*HealthStatus) ReadField2 added in v1.11.0

func (p *HealthStatus) ReadField2(iprot thrift.TProtocol) error

func (*HealthStatus) String added in v1.11.0

func (p *HealthStatus) String() string

func (*HealthStatus) Write added in v1.11.0

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

type Meta added in v1.11.0

type Meta interface {
	Health() (r *HealthStatus, err error)
}

type MetaClient added in v1.11.0

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

func NewMetaClientFactory added in v1.11.0

func NewMetaClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *MetaClient

func NewMetaClientProtocol added in v1.11.0

func NewMetaClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *MetaClient

func (*MetaClient) Health added in v1.11.0

func (p *MetaClient) Health() (r *HealthStatus, err error)

type MetaHealthArgs added in v1.11.0

type MetaHealthArgs struct {
}

func NewMetaHealthArgs added in v1.11.0

func NewMetaHealthArgs() *MetaHealthArgs

func (*MetaHealthArgs) Read added in v1.11.0

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

func (*MetaHealthArgs) String added in v1.11.0

func (p *MetaHealthArgs) String() string

func (*MetaHealthArgs) Write added in v1.11.0

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

type MetaHealthResult added in v1.11.0

type MetaHealthResult struct {
	Success *HealthStatus `thrift:"success,0" db:"success" json:"success,omitempty"`
}

Attributes:

  • Success

func NewMetaHealthResult added in v1.11.0

func NewMetaHealthResult() *MetaHealthResult

func (*MetaHealthResult) GetSuccess added in v1.11.0

func (p *MetaHealthResult) GetSuccess() *HealthStatus

func (*MetaHealthResult) IsSetSuccess added in v1.11.0

func (p *MetaHealthResult) IsSetSuccess() bool

func (*MetaHealthResult) Read added in v1.11.0

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

func (*MetaHealthResult) ReadField0 added in v1.11.0

func (p *MetaHealthResult) ReadField0(iprot thrift.TProtocol) error

func (*MetaHealthResult) String added in v1.11.0

func (p *MetaHealthResult) String() string

func (*MetaHealthResult) Write added in v1.11.0

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

type MetaProcessor added in v1.11.0

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

func NewMetaProcessor added in v1.11.0

func NewMetaProcessor(handler Meta) *MetaProcessor

func (*MetaProcessor) AddToProcessorMap added in v1.11.0

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

func (*MetaProcessor) GetProcessorFunction added in v1.11.0

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

func (*MetaProcessor) Process added in v1.11.0

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

func (*MetaProcessor) ProcessorMap added in v1.11.0

func (p *MetaProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type NewErr_ added in v1.2.3

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

Attributes:

  • Message
var SimpleServiceSimpleFutureResult_NewErr__DEFAULT *NewErr_

func NewNewErr_ added in v1.2.3

func NewNewErr_() *NewErr_

func (*NewErr_) Error added in v1.2.3

func (p *NewErr_) Error() string

func (*NewErr_) GetMessage added in v1.2.3

func (p *NewErr_) GetMessage() string

func (*NewErr_) Read added in v1.2.3

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

func (*NewErr_) ReadField1 added in v1.2.3

func (p *NewErr_) ReadField1(iprot thrift.TProtocol) error

func (*NewErr_) String added in v1.2.3

func (p *NewErr_) String() string

func (*NewErr_) Write added in v1.2.3

func (p *NewErr_) 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" db:"arg" json:"arg"`
}

Attributes:

  • Arg

func NewSecondServiceEchoArgs

func NewSecondServiceEchoArgs() *SecondServiceEchoArgs

func (*SecondServiceEchoArgs) GetArg

func (p *SecondServiceEchoArgs) GetArg() string

func (*SecondServiceEchoArgs) Read

func (*SecondServiceEchoArgs) ReadField1 added in v1.0.8

func (p *SecondServiceEchoArgs) ReadField1(iprot thrift.TProtocol) error

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" db:"success" 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) ReadField0 added in v1.0.8

func (p *SecondServiceEchoResult) ReadField0(iprot thrift.TProtocol) error

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" db:"message" json:"message"`
}

Attributes:

  • Message
var SimpleServiceSimpleFutureResult_SimpleErr_DEFAULT *SimpleErr
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) ReadField1 added in v1.0.8

func (p *SimpleErr) ReadField1(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)
	SimpleFuture() (err error)
}

type SimpleServiceCallArgs

type SimpleServiceCallArgs struct {
	Arg *Data `thrift:"arg,1" db:"arg" 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) ReadField1 added in v1.0.8

func (p *SimpleServiceCallArgs) ReadField1(iprot thrift.TProtocol) error

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" db:"success" 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) ReadField0 added in v1.0.8

func (p *SimpleServiceCallResult) ReadField0(iprot thrift.TProtocol) error

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)

func (*SimpleServiceClient) SimpleFuture added in v1.2.3

func (p *SimpleServiceClient) SimpleFuture() (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 SimpleServiceSimpleFutureArgs added in v1.2.3

type SimpleServiceSimpleFutureArgs struct {
}

func NewSimpleServiceSimpleFutureArgs added in v1.2.3

func NewSimpleServiceSimpleFutureArgs() *SimpleServiceSimpleFutureArgs

func (*SimpleServiceSimpleFutureArgs) Read added in v1.2.3

func (*SimpleServiceSimpleFutureArgs) String added in v1.2.3

func (*SimpleServiceSimpleFutureArgs) Write added in v1.2.3

type SimpleServiceSimpleFutureResult added in v1.2.3

type SimpleServiceSimpleFutureResult struct {
	SimpleErr *SimpleErr `thrift:"simpleErr,1" db:"simpleErr" json:"simpleErr,omitempty"`
	NewErr_   *NewErr_   `thrift:"newErr,2" db:"newErr" json:"newErr,omitempty"`
}

Attributes:

  • SimpleErr
  • NewErr_

func NewSimpleServiceSimpleFutureResult added in v1.2.3

func NewSimpleServiceSimpleFutureResult() *SimpleServiceSimpleFutureResult

func (*SimpleServiceSimpleFutureResult) GetNewErr_ added in v1.2.3

func (p *SimpleServiceSimpleFutureResult) GetNewErr_() *NewErr_

func (*SimpleServiceSimpleFutureResult) GetSimpleErr added in v1.2.3

func (p *SimpleServiceSimpleFutureResult) GetSimpleErr() *SimpleErr

func (*SimpleServiceSimpleFutureResult) IsSetNewErr_ added in v1.2.3

func (p *SimpleServiceSimpleFutureResult) IsSetNewErr_() bool

func (*SimpleServiceSimpleFutureResult) IsSetSimpleErr added in v1.2.3

func (p *SimpleServiceSimpleFutureResult) IsSetSimpleErr() bool

func (*SimpleServiceSimpleFutureResult) Read added in v1.2.3

func (*SimpleServiceSimpleFutureResult) ReadField1 added in v1.2.3

func (*SimpleServiceSimpleFutureResult) ReadField2 added in v1.2.3

func (*SimpleServiceSimpleFutureResult) String added in v1.2.3

func (*SimpleServiceSimpleFutureResult) Write added in v1.2.3

type SimpleServiceSimpleResult

type SimpleServiceSimpleResult struct {
	SimpleErr *SimpleErr `thrift:"simpleErr,1" db:"simpleErr" 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) ReadField1 added in v1.0.8

func (p *SimpleServiceSimpleResult) ReadField1(iprot thrift.TProtocol) error

func (*SimpleServiceSimpleResult) String

func (p *SimpleServiceSimpleResult) String() string

func (*SimpleServiceSimpleResult) Write

type TChanMeta added in v1.11.0

type TChanMeta interface {
	Health(ctx thrift.Context) (*HealthStatus, error)
}

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

func NewTChanMetaClient added in v1.11.0

func NewTChanMetaClient(client thrift.TChanClient) TChanMeta

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

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
	SimpleFuture(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