tutorial

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int
View Source
var RpcServiceHelloResult_Success_DEFAULT string
View Source
var RpcServicePlusResult_Success_DEFAULT int32
View Source
var RpcServiceSortResult_Success_DEFAULT []int32
View Source
var SortDesc_Asc_DEFAULT bool = true

Functions

This section is empty.

Types

type Node

type Node struct {
	A int32 `thrift:"a,1" json:"a"`
	B int32 `thrift:"b,2" json:"b"`
}

Attributes:

  • A
  • B
var RpcServicePlusArgs_Req_DEFAULT *Node

func NewNode

func NewNode() *Node

func (*Node) GetA

func (p *Node) GetA() int32

func (*Node) GetB

func (p *Node) GetB() int32

func (*Node) Read

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

func (*Node) String

func (p *Node) String() string

func (*Node) Write

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

type RpcService

type RpcService interface {
	// Parameters:
	//  - Req
	Plus(req *Node) (r int32, err error)
	Hello() (r string, err error)
	// Parameters:
	//  - Sd
	Sort(sd *SortDesc) (r []int32, err error)
}

type RpcServiceClient

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

func NewRpcServiceClientProtocol

func NewRpcServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *RpcServiceClient

func (*RpcServiceClient) Hello

func (p *RpcServiceClient) Hello() (r string, err error)

func (*RpcServiceClient) Plus

func (p *RpcServiceClient) Plus(req *Node) (r int32, err error)

Parameters:

  • Req

func (*RpcServiceClient) Sort

func (p *RpcServiceClient) Sort(sd *SortDesc) (r []int32, err error)

Parameters:

  • Sd

type RpcServiceHelloArgs

type RpcServiceHelloArgs struct {
}

func NewRpcServiceHelloArgs

func NewRpcServiceHelloArgs() *RpcServiceHelloArgs

func (*RpcServiceHelloArgs) Read

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

func (*RpcServiceHelloArgs) String

func (p *RpcServiceHelloArgs) String() string

func (*RpcServiceHelloArgs) Write

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

type RpcServiceHelloResult

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

Attributes:

  • Success

func NewRpcServiceHelloResult

func NewRpcServiceHelloResult() *RpcServiceHelloResult

func (*RpcServiceHelloResult) GetSuccess

func (p *RpcServiceHelloResult) GetSuccess() string

func (*RpcServiceHelloResult) IsSetSuccess

func (p *RpcServiceHelloResult) IsSetSuccess() bool

func (*RpcServiceHelloResult) Read

func (*RpcServiceHelloResult) String

func (p *RpcServiceHelloResult) String() string

func (*RpcServiceHelloResult) Write

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

type RpcServicePlusArgs

type RpcServicePlusArgs struct {
	Req *Node `thrift:"req,1" json:"req"`
}

Attributes:

  • Req

func NewRpcServicePlusArgs

func NewRpcServicePlusArgs() *RpcServicePlusArgs

func (*RpcServicePlusArgs) GetReq

func (p *RpcServicePlusArgs) GetReq() *Node

func (*RpcServicePlusArgs) IsSetReq

func (p *RpcServicePlusArgs) IsSetReq() bool

func (*RpcServicePlusArgs) Read

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

func (*RpcServicePlusArgs) String

func (p *RpcServicePlusArgs) String() string

func (*RpcServicePlusArgs) Write

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

type RpcServicePlusResult

type RpcServicePlusResult struct {
	Success *int32 `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewRpcServicePlusResult

func NewRpcServicePlusResult() *RpcServicePlusResult

func (*RpcServicePlusResult) GetSuccess

func (p *RpcServicePlusResult) GetSuccess() int32

func (*RpcServicePlusResult) IsSetSuccess

func (p *RpcServicePlusResult) IsSetSuccess() bool

func (*RpcServicePlusResult) Read

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

func (*RpcServicePlusResult) String

func (p *RpcServicePlusResult) String() string

func (*RpcServicePlusResult) Write

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

type RpcServiceProcessor

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

func NewRpcServiceProcessor

func NewRpcServiceProcessor(handler RpcService) *RpcServiceProcessor

func (*RpcServiceProcessor) AddToProcessorMap

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

func (*RpcServiceProcessor) GetProcessorFunction

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

func (*RpcServiceProcessor) Process

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

func (*RpcServiceProcessor) ProcessorMap

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

type RpcServiceSortArgs

type RpcServiceSortArgs struct {
	Sd *SortDesc `thrift:"sd,1" json:"sd"`
}

Attributes:

  • Sd

func NewRpcServiceSortArgs

func NewRpcServiceSortArgs() *RpcServiceSortArgs

func (*RpcServiceSortArgs) GetSd

func (p *RpcServiceSortArgs) GetSd() *SortDesc

func (*RpcServiceSortArgs) IsSetSd

func (p *RpcServiceSortArgs) IsSetSd() bool

func (*RpcServiceSortArgs) Read

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

func (*RpcServiceSortArgs) String

func (p *RpcServiceSortArgs) String() string

func (*RpcServiceSortArgs) Write

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

type RpcServiceSortResult

type RpcServiceSortResult struct {
	Success []int32 `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewRpcServiceSortResult

func NewRpcServiceSortResult() *RpcServiceSortResult

func (*RpcServiceSortResult) GetSuccess

func (p *RpcServiceSortResult) GetSuccess() []int32

func (*RpcServiceSortResult) IsSetSuccess

func (p *RpcServiceSortResult) IsSetSuccess() bool

func (*RpcServiceSortResult) Read

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

func (*RpcServiceSortResult) String

func (p *RpcServiceSortResult) String() string

func (*RpcServiceSortResult) Write

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

type SortDesc

type SortDesc struct {
	Limit int32 `thrift:"limit,1,required" json:"limit"`
	Asc   bool  `thrift:"asc,2" json:"asc,omitempty"`
}

Attributes:

  • Limit
  • Asc
var RpcServiceSortArgs_Sd_DEFAULT *SortDesc

func NewSortDesc

func NewSortDesc() *SortDesc

func (*SortDesc) GetAsc

func (p *SortDesc) GetAsc() bool

func (*SortDesc) GetLimit

func (p *SortDesc) GetLimit() int32

func (*SortDesc) IsSetAsc

func (p *SortDesc) IsSetAsc() bool

func (*SortDesc) Read

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

func (*SortDesc) String

func (p *SortDesc) String() string

func (*SortDesc) Write

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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