Documentation ¶
Overview ¶
Package service is a generated protocol buffer package.
It is generated from these files:
echo.proto arith.proto
It has these top-level messages:
EchoRequest EchoResponse ArithRequest ArithResponse
Index ¶
- func NewArithServiceServer(x ArithService) *rpc.Server
- func NewEchoServiceServer(x EchoService) *rpc.Server
- func RegisterArithService(srv *rpc.Server, x ArithService) error
- func RegisterEchoService(srv *rpc.Server, x EchoService) error
- func StartArithServiceServer(uri string, exchangeName string, queueName string, x ArithService) (err error)
- func StartEchoServiceServer(uri string, exchangeName string, queueName string, x EchoService) (err error)
- type Arith
- type ArithRequest
- type ArithResponse
- type ArithService
- type ArithServiceClient
- func (c *ArithServiceClient) Add(in *ArithRequest) (out *ArithResponse, err error)
- func (c *ArithServiceClient) Div(in *ArithRequest) (out *ArithResponse, err error)
- func (c *ArithServiceClient) Error(in *ArithRequest) (out *ArithResponse, err error)
- func (c *ArithServiceClient) Mul(in *ArithRequest) (out *ArithResponse, err error)
- type Echo
- type EchoRequest
- type EchoResponse
- type EchoService
- type EchoServiceClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewArithServiceServer ¶
func NewArithServiceServer(x ArithService) *rpc.Server
NewArithServiceServer returns a new ArithService Server.
func NewEchoServiceServer ¶
func NewEchoServiceServer(x EchoService) *rpc.Server
NewEchoServiceServer returns a new EchoService Server.
func RegisterArithService ¶
func RegisterArithService(srv *rpc.Server, x ArithService) error
RegisterArithService publish the given ArithService implementation on the server.
func RegisterEchoService ¶
func RegisterEchoService(srv *rpc.Server, x EchoService) error
RegisterEchoService publish the given EchoService implementation on the server.
func StartArithServiceServer ¶
func StartArithServiceServer(uri string, exchangeName string, queueName string, x ArithService) (err error)
StartArithServiceServer start one rpc server
func StartEchoServiceServer ¶
func StartEchoServiceServer(uri string, exchangeName string, queueName string, x EchoService) (err error)
StartEchoServiceServer start one rpc server
Types ¶
type Arith ¶
type Arith int
func (*Arith) Add ¶
func (t *Arith) Add(args *ArithRequest, reply *ArithResponse) error
func (*Arith) Div ¶
func (t *Arith) Div(args *ArithRequest, reply *ArithResponse) error
func (*Arith) Error ¶
func (t *Arith) Error(args *ArithRequest, reply *ArithResponse) error
func (*Arith) Mul ¶
func (t *Arith) Mul(args *ArithRequest, reply *ArithResponse) error
type ArithRequest ¶
type ArithRequest struct { A int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` B int32 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"` }
func (*ArithRequest) Descriptor ¶
func (*ArithRequest) Descriptor() ([]byte, []int)
func (*ArithRequest) GetA ¶
func (m *ArithRequest) GetA() int32
func (*ArithRequest) GetB ¶
func (m *ArithRequest) GetB() int32
func (*ArithRequest) ProtoMessage ¶
func (*ArithRequest) ProtoMessage()
func (*ArithRequest) Reset ¶
func (m *ArithRequest) Reset()
func (*ArithRequest) String ¶
func (m *ArithRequest) String() string
type ArithResponse ¶
type ArithResponse struct {
C int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"`
}
func (*ArithResponse) Descriptor ¶
func (*ArithResponse) Descriptor() ([]byte, []int)
func (*ArithResponse) GetC ¶
func (m *ArithResponse) GetC() int32
func (*ArithResponse) ProtoMessage ¶
func (*ArithResponse) ProtoMessage()
func (*ArithResponse) Reset ¶
func (m *ArithResponse) Reset()
func (*ArithResponse) String ¶
func (m *ArithResponse) String() string
type ArithService ¶
type ArithService interface { Add(in *ArithRequest, out *ArithResponse) error Mul(in *ArithRequest, out *ArithResponse) error Div(in *ArithRequest, out *ArithResponse) error Error(in *ArithRequest, out *ArithResponse) error }
type ArithServiceClient ¶
func NewArithServiceClient ¶
func NewArithServiceClient(uri string, exchangeName string, queueName string) *ArithServiceClient
NewArithServiceClient returns a ArithService stub to handle requests to the set of ArithService at the other end of the connection.
func (*ArithServiceClient) Add ¶
func (c *ArithServiceClient) Add(in *ArithRequest) (out *ArithResponse, err error)
func (*ArithServiceClient) Div ¶
func (c *ArithServiceClient) Div(in *ArithRequest) (out *ArithResponse, err error)
func (*ArithServiceClient) Error ¶
func (c *ArithServiceClient) Error(in *ArithRequest) (out *ArithResponse, err error)
func (*ArithServiceClient) Mul ¶
func (c *ArithServiceClient) Mul(in *ArithRequest) (out *ArithResponse, err error)
type Echo ¶
type Echo int
func (*Echo) Echo ¶
func (t *Echo) Echo(args *EchoRequest, reply *EchoResponse) error
func (*Echo) EchoTwice ¶
func (t *Echo) EchoTwice(args *EchoRequest, reply *EchoResponse) error
type EchoRequest ¶
type EchoRequest struct {
Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
}
func (*EchoRequest) Descriptor ¶
func (*EchoRequest) Descriptor() ([]byte, []int)
func (*EchoRequest) GetMsg ¶
func (m *EchoRequest) GetMsg() string
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) Reset ¶
func (m *EchoRequest) Reset()
func (*EchoRequest) String ¶
func (m *EchoRequest) String() string
type EchoResponse ¶
type EchoResponse struct {
Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
}
func (*EchoResponse) Descriptor ¶
func (*EchoResponse) Descriptor() ([]byte, []int)
func (*EchoResponse) GetMsg ¶
func (m *EchoResponse) GetMsg() string
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) Reset ¶
func (m *EchoResponse) Reset()
func (*EchoResponse) String ¶
func (m *EchoResponse) String() string
type EchoService ¶
type EchoService interface { Echo(in *EchoRequest, out *EchoResponse) error EchoTwice(in *EchoRequest, out *EchoResponse) error }
type EchoServiceClient ¶
func NewEchoServiceClient ¶
func NewEchoServiceClient(uri string, exchangeName string, queueName string) *EchoServiceClient
NewEchoServiceClient returns a EchoService stub to handle requests to the set of EchoService at the other end of the connection.
func (*EchoServiceClient) Echo ¶
func (c *EchoServiceClient) Echo(in *EchoRequest) (out *EchoResponse, err error)
func (*EchoServiceClient) EchoTwice ¶
func (c *EchoServiceClient) EchoTwice(in *EchoRequest) (out *EchoResponse, err error)