service

package
v0.0.0-...-0c173dd Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

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

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

type ArithServiceClient struct {
	*rpc.Client
}

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

type EchoServiceClient struct {
	*rpc.Client
}

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)

Jump to

Keyboard shortcuts

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