example

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2016 License: MIT Imports: 4 Imported by: 10

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var FirstEchoResult_Success_DEFAULT string
View Source
var GoUnusedProtection__ int

Functions

func NewTChanBaseInheritedClient

func NewTChanBaseInheritedClient(thriftService string, client thrift.TChanClient) *tchanBaseClient

func NewTChanBaseServer

func NewTChanBaseServer(handler TChanBase) thrift.TChanServer

NewTChanBaseServer wraps a handler for TChanBase so it can be registered with a thrift.Server.

func NewTChanFirstInheritedClient

func NewTChanFirstInheritedClient(thriftService string, client thrift.TChanClient) *tchanFirstClient

func NewTChanFirstServer

func NewTChanFirstServer(handler TChanFirst) thrift.TChanServer

NewTChanFirstServer wraps a handler for TChanFirst so it can be registered with a thrift.Server.

func NewTChanSecondInheritedClient

func NewTChanSecondInheritedClient(thriftService string, client thrift.TChanClient) *tchanSecondClient

func NewTChanSecondServer

func NewTChanSecondServer(handler TChanSecond) thrift.TChanServer

NewTChanSecondServer wraps a handler for TChanSecond so it can be registered with a thrift.Server.

Types

type Base

type Base interface {
	BaseCall() (err error)
}

type BaseBaseCallArgs

type BaseBaseCallArgs struct {
}

func NewBaseBaseCallArgs

func NewBaseBaseCallArgs() *BaseBaseCallArgs

func (*BaseBaseCallArgs) Read

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

func (*BaseBaseCallArgs) String

func (p *BaseBaseCallArgs) String() string

func (*BaseBaseCallArgs) Write

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

type BaseBaseCallResult

type BaseBaseCallResult struct {
}

func NewBaseBaseCallResult

func NewBaseBaseCallResult() *BaseBaseCallResult

func (*BaseBaseCallResult) Read

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

func (*BaseBaseCallResult) String

func (p *BaseBaseCallResult) String() string

func (*BaseBaseCallResult) Write

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

type BaseClient

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

func NewBaseClientProtocol

func NewBaseClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *BaseClient

func (*BaseClient) BaseCall

func (p *BaseClient) BaseCall() (err error)

type BaseProcessor

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

func NewBaseProcessor

func NewBaseProcessor(handler Base) *BaseProcessor

func (*BaseProcessor) AddToProcessorMap

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

func (*BaseProcessor) GetProcessorFunction

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

func (*BaseProcessor) Process

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

func (*BaseProcessor) ProcessorMap

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

type First

type First interface {
	Base

	// Parameters:
	//  - Msg
	Echo(msg string) (r string, err error)
	Healthcheck() (r *HealthCheckRes, err error)
	AppError() (err error)
}

type FirstAppErrorArgs

type FirstAppErrorArgs struct {
}

func NewFirstAppErrorArgs

func NewFirstAppErrorArgs() *FirstAppErrorArgs

func (*FirstAppErrorArgs) Read

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

func (*FirstAppErrorArgs) String

func (p *FirstAppErrorArgs) String() string

func (*FirstAppErrorArgs) Write

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

type FirstAppErrorResult

type FirstAppErrorResult struct {
}

func NewFirstAppErrorResult

func NewFirstAppErrorResult() *FirstAppErrorResult

func (*FirstAppErrorResult) Read

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

func (*FirstAppErrorResult) String

func (p *FirstAppErrorResult) String() string

func (*FirstAppErrorResult) Write

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

type FirstClient

type FirstClient struct {
	*BaseClient
}

func NewFirstClientProtocol

func NewFirstClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *FirstClient

func (*FirstClient) AppError

func (p *FirstClient) AppError() (err error)

func (*FirstClient) Echo

func (p *FirstClient) Echo(msg string) (r string, err error)

Parameters:

  • Msg

func (*FirstClient) Healthcheck

func (p *FirstClient) Healthcheck() (r *HealthCheckRes, err error)

type FirstEchoArgs

type FirstEchoArgs struct {
	Msg string `thrift:"msg,1" db:"msg" json:"msg"`
}

Attributes:

  • Msg

func NewFirstEchoArgs

func NewFirstEchoArgs() *FirstEchoArgs

func (*FirstEchoArgs) GetMsg

func (p *FirstEchoArgs) GetMsg() string

func (*FirstEchoArgs) Read

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

func (*FirstEchoArgs) ReadField1

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

func (*FirstEchoArgs) String

func (p *FirstEchoArgs) String() string

func (*FirstEchoArgs) Write

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

type FirstEchoResult

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

Attributes:

  • Success

func NewFirstEchoResult

func NewFirstEchoResult() *FirstEchoResult

func (*FirstEchoResult) GetSuccess

func (p *FirstEchoResult) GetSuccess() string

func (*FirstEchoResult) IsSetSuccess

func (p *FirstEchoResult) IsSetSuccess() bool

func (*FirstEchoResult) Read

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

func (*FirstEchoResult) ReadField0

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

func (*FirstEchoResult) String

func (p *FirstEchoResult) String() string

func (*FirstEchoResult) Write

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

type FirstHealthcheckArgs

type FirstHealthcheckArgs struct {
}

func NewFirstHealthcheckArgs

func NewFirstHealthcheckArgs() *FirstHealthcheckArgs

func (*FirstHealthcheckArgs) Read

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

func (*FirstHealthcheckArgs) String

func (p *FirstHealthcheckArgs) String() string

func (*FirstHealthcheckArgs) Write

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

type FirstHealthcheckResult

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

Attributes:

  • Success

func NewFirstHealthcheckResult

func NewFirstHealthcheckResult() *FirstHealthcheckResult

func (*FirstHealthcheckResult) GetSuccess

func (p *FirstHealthcheckResult) GetSuccess() *HealthCheckRes

func (*FirstHealthcheckResult) IsSetSuccess

func (p *FirstHealthcheckResult) IsSetSuccess() bool

func (*FirstHealthcheckResult) Read

func (*FirstHealthcheckResult) ReadField0

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

func (*FirstHealthcheckResult) String

func (p *FirstHealthcheckResult) String() string

func (*FirstHealthcheckResult) Write

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

type FirstProcessor

type FirstProcessor struct {
	*BaseProcessor
}

func NewFirstProcessor

func NewFirstProcessor(handler First) *FirstProcessor

type HealthCheckRes

type HealthCheckRes struct {
	Healthy bool   `thrift:"healthy,1" db:"healthy" json:"healthy"`
	Msg     string `thrift:"msg,2" db:"msg" json:"msg"`
}

Attributes:

  • Healthy
  • Msg
var FirstHealthcheckResult_Success_DEFAULT *HealthCheckRes

func NewHealthCheckRes

func NewHealthCheckRes() *HealthCheckRes

func (*HealthCheckRes) GetHealthy

func (p *HealthCheckRes) GetHealthy() bool

func (*HealthCheckRes) GetMsg

func (p *HealthCheckRes) GetMsg() string

func (*HealthCheckRes) Read

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

func (*HealthCheckRes) ReadField1

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

func (*HealthCheckRes) ReadField2

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

func (*HealthCheckRes) String

func (p *HealthCheckRes) String() string

func (*HealthCheckRes) Write

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

type Second

type Second interface {
	Test() (err error)
}

type SecondClient

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

func NewSecondClientProtocol

func NewSecondClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *SecondClient

func (*SecondClient) Test

func (p *SecondClient) Test() (err error)

type SecondProcessor

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

func NewSecondProcessor

func NewSecondProcessor(handler Second) *SecondProcessor

func (*SecondProcessor) AddToProcessorMap

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

func (*SecondProcessor) GetProcessorFunction

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

func (*SecondProcessor) Process

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

func (*SecondProcessor) ProcessorMap

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

type SecondTestArgs

type SecondTestArgs struct {
}

func NewSecondTestArgs

func NewSecondTestArgs() *SecondTestArgs

func (*SecondTestArgs) Read

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

func (*SecondTestArgs) String

func (p *SecondTestArgs) String() string

func (*SecondTestArgs) Write

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

type SecondTestResult

type SecondTestResult struct {
}

func NewSecondTestResult

func NewSecondTestResult() *SecondTestResult

func (*SecondTestResult) Read

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

func (*SecondTestResult) String

func (p *SecondTestResult) String() string

func (*SecondTestResult) Write

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

type TChanBase

type TChanBase interface {
	BaseCall(ctx thrift.Context) error
}

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

func NewTChanBaseClient

func NewTChanBaseClient(client thrift.TChanClient) TChanBase

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

type TChanFirst

type TChanFirst interface {
	TChanBase

	AppError(ctx thrift.Context) error
	Echo(ctx thrift.Context, msg string) (string, error)
	Healthcheck(ctx thrift.Context) (*HealthCheckRes, error)
}

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

func NewTChanFirstClient

func NewTChanFirstClient(client thrift.TChanClient) TChanFirst

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

type TChanSecond

type TChanSecond interface {
	Test(ctx thrift.Context) error
}

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

func NewTChanSecondClient

func NewTChanSecondClient(client thrift.TChanClient) TChanSecond

NewTChanSecondClient 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