echo

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int

Functions

func NewTChanEchoInheritedClient

func NewTChanEchoInheritedClient(thriftService string, client thrift.TChanClient) *tchanEchoClient

func NewTChanEchoServer

func NewTChanEchoServer(handler TChanEcho) thrift.TChanServer

NewTChanEchoServer wraps a handler for TChanEcho so it can be registered with a thrift.Server.

Types

type Echo

type Echo interface {
	// Parameters:
	//  - Ping
	Echo(ping *Ping) (r *Pong, err error)
}

type EchoClient

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

func NewEchoClientProtocol

func NewEchoClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *EchoClient

func (*EchoClient) Echo

func (p *EchoClient) Echo(ping *Ping) (r *Pong, err error)

Parameters:

  • Ping

type EchoEchoArgs

type EchoEchoArgs struct {
	Ping *Ping `thrift:"ping,1" json:"ping"`
}

Attributes:

  • Ping

func NewEchoEchoArgs

func NewEchoEchoArgs() *EchoEchoArgs

func (*EchoEchoArgs) GetPing

func (p *EchoEchoArgs) GetPing() *Ping

func (*EchoEchoArgs) IsSetPing

func (p *EchoEchoArgs) IsSetPing() bool

func (*EchoEchoArgs) Read

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

func (*EchoEchoArgs) String

func (p *EchoEchoArgs) String() string

func (*EchoEchoArgs) Write

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

type EchoEchoResult

type EchoEchoResult struct {
	Success *Pong `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewEchoEchoResult

func NewEchoEchoResult() *EchoEchoResult

func (*EchoEchoResult) GetSuccess

func (p *EchoEchoResult) GetSuccess() *Pong

func (*EchoEchoResult) IsSetSuccess

func (p *EchoEchoResult) IsSetSuccess() bool

func (*EchoEchoResult) Read

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

func (*EchoEchoResult) String

func (p *EchoEchoResult) String() string

func (*EchoEchoResult) Write

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

type EchoProcessor

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

func NewEchoProcessor

func NewEchoProcessor(handler Echo) *EchoProcessor

func (*EchoProcessor) AddToProcessorMap

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

func (*EchoProcessor) GetProcessorFunction

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

func (*EchoProcessor) Process

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

func (*EchoProcessor) ProcessorMap

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

type Ping

type Ping struct {
	Beep string `thrift:"beep,1,required" json:"beep"`
}

Attributes:

  • Beep
var EchoEchoArgs_Ping_DEFAULT *Ping

func NewPing

func NewPing() *Ping

func (*Ping) GetBeep

func (p *Ping) GetBeep() string

func (*Ping) Read

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

func (*Ping) String

func (p *Ping) String() string

func (*Ping) Write

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

type Pong

type Pong struct {
	Boop string `thrift:"boop,1,required" json:"boop"`
}

Attributes:

  • Boop
var EchoEchoResult_Success_DEFAULT *Pong

func NewPong

func NewPong() *Pong

func (*Pong) GetBoop

func (p *Pong) GetBoop() string

func (*Pong) Read

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

func (*Pong) String

func (p *Pong) String() string

func (*Pong) Write

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

type TChanEcho

type TChanEcho interface {
	Echo(ctx thrift.Context, ping *Ping) (*Pong, error)
}

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

func NewTChanEchoClient

func NewTChanEchoClient(client thrift.TChanClient) TChanEcho

NewTChanEchoClient 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