Documentation ¶
Overview ¶
Package service is a generated protocol buffer package.
It is generated from these files:
arith.proto echo.proto
It has these top-level messages:
ArithRequest ArithResponse EchoRequest EchoResponse
Index ¶
- func AcceptArithServiceClient(lis net.Listener, x ArithService)
- func AcceptEchoServiceClient(lis net.Listener, x EchoService)
- func ListenAndServeArithService(network, addr string, x ArithService) error
- func ListenAndServeEchoService(network, addr string, x EchoService) error
- 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 ServeArithService(conn io.ReadWriteCloser, x ArithService)
- func ServeEchoService(conn io.ReadWriteCloser, x EchoService)
- type ArithRequest
- type ArithResponse
- type ArithService
- type ArithServiceClient
- func DialArithService(network, addr string) (*ArithServiceClient, error)
- func DialArithServiceHTTP(network, address string) (*ArithServiceClient, error)
- func DialArithServiceHTTPPath(network, address, path string) (*ArithServiceClient, error)
- func DialArithServiceHTTPS(network, address string, tlsConfig *tls.Config) (*ArithServiceClient, error)
- func DialArithServiceHTTPSPath(network, address, path string, tlsConfig *tls.Config) (*ArithServiceClient, error)
- func DialArithServiceTimeout(network, addr string, timeout time.Duration) (*ArithServiceClient, error)
- func NewArithServiceClient(conn io.ReadWriteCloser) *ArithServiceClient
- func (c *ArithServiceClient) Add(in *ArithRequest) (out *ArithResponse, err error)
- func (c *ArithServiceClient) AsyncAdd(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
- func (c *ArithServiceClient) AsyncDiv(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
- func (c *ArithServiceClient) AsyncError(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
- func (c *ArithServiceClient) AsyncMul(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
- 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 EchoRequest
- type EchoResponse
- type EchoService
- type EchoServiceClient
- func DialEchoService(network, addr string) (*EchoServiceClient, error)
- func DialEchoServiceHTTP(network, address string) (*EchoServiceClient, error)
- func DialEchoServiceHTTPPath(network, address, path string) (*EchoServiceClient, error)
- func DialEchoServiceHTTPS(network, address string, tlsConfig *tls.Config) (*EchoServiceClient, error)
- func DialEchoServiceHTTPSPath(network, address, path string, tlsConfig *tls.Config) (*EchoServiceClient, error)
- func DialEchoServiceTimeout(network, addr string, timeout time.Duration) (*EchoServiceClient, error)
- func NewEchoServiceClient(conn io.ReadWriteCloser) *EchoServiceClient
- func (c *EchoServiceClient) AsyncEcho(in *EchoRequest, out *EchoResponse, done chan *rpc.Call) *rpc.Call
- func (c *EchoServiceClient) AsyncEchoTwice(in *EchoRequest, out *EchoResponse, done chan *rpc.Call) *rpc.Call
- func (c *EchoServiceClient) Echo(in *EchoRequest) (out *EchoResponse, err error)
- func (c *EchoServiceClient) EchoTwice(in *EchoRequest) (out *EchoResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptArithServiceClient ¶
func AcceptArithServiceClient(lis net.Listener, x ArithService)
AcceptArithServiceClient accepts connections on the listener and serves requests for each incoming connection. Accept blocks; the caller typically invokes it in a go statement.
func AcceptEchoServiceClient ¶
func AcceptEchoServiceClient(lis net.Listener, x EchoService)
AcceptEchoServiceClient accepts connections on the listener and serves requests for each incoming connection. Accept blocks; the caller typically invokes it in a go statement.
func ListenAndServeArithService ¶
func ListenAndServeArithService(network, addr string, x ArithService) error
ListenAndServeArithService listen announces on the local network address laddr and serves the given ArithService implementation.
func ListenAndServeEchoService ¶
func ListenAndServeEchoService(network, addr string, x EchoService) error
ListenAndServeEchoService listen announces on the local network address laddr and serves the given EchoService implementation.
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 ServeArithService ¶
func ServeArithService(conn io.ReadWriteCloser, x ArithService)
ServeArithService serves the given ArithService implementation.
func ServeEchoService ¶
func ServeEchoService(conn io.ReadWriteCloser, x EchoService)
ServeEchoService serves the given EchoService implementation.
Types ¶
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 DialArithService ¶
func DialArithService(network, addr string) (*ArithServiceClient, error)
DialArithService connects to an ArithService at the specified network address.
func DialArithServiceHTTP ¶ added in v1.1.0
func DialArithServiceHTTP(network, address string) (*ArithServiceClient, error)
DialArithServiceHTTP connects to an HTTP RPC server at the specified network address listening on the default HTTP RPC path.
func DialArithServiceHTTPPath ¶ added in v1.1.0
func DialArithServiceHTTPPath(network, address, path string) (*ArithServiceClient, error)
DialArithServiceHTTPPath connects to an HTTP RPC server at the specified network address and path.
func DialArithServiceHTTPS ¶ added in v1.1.0
func DialArithServiceHTTPS(network, address string, tlsConfig *tls.Config) (*ArithServiceClient, error)
DialArithServiceHTTPS connects to an HTTPS RPC server at the specified network address listening on the default HTTP RPC path.
func DialArithServiceHTTPSPath ¶ added in v1.1.0
func DialArithServiceHTTPSPath(network, address, path string, tlsConfig *tls.Config) (*ArithServiceClient, error)
DialArithServiceHTTPSPath connects to an HTTPS RPC server at the specified network address and path.
func DialArithServiceTimeout ¶
func DialArithServiceTimeout(network, addr string, timeout time.Duration) (*ArithServiceClient, error)
DialArithServiceTimeout connects to an ArithService at the specified network address.
func NewArithServiceClient ¶
func NewArithServiceClient(conn io.ReadWriteCloser) *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) AsyncAdd ¶
func (c *ArithServiceClient) AsyncAdd(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
func (*ArithServiceClient) AsyncDiv ¶
func (c *ArithServiceClient) AsyncDiv(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
func (*ArithServiceClient) AsyncError ¶
func (c *ArithServiceClient) AsyncError(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
func (*ArithServiceClient) AsyncMul ¶
func (c *ArithServiceClient) AsyncMul(in *ArithRequest, out *ArithResponse, done chan *rpc.Call) *rpc.Call
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 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 DialEchoService ¶
func DialEchoService(network, addr string) (*EchoServiceClient, error)
DialEchoService connects to an EchoService at the specified network address.
func DialEchoServiceHTTP ¶ added in v1.1.0
func DialEchoServiceHTTP(network, address string) (*EchoServiceClient, error)
DialEchoServiceHTTP connects to an HTTP RPC server at the specified network address listening on the default HTTP RPC path.
func DialEchoServiceHTTPPath ¶ added in v1.1.0
func DialEchoServiceHTTPPath(network, address, path string) (*EchoServiceClient, error)
DialEchoServiceHTTPPath connects to an HTTP RPC server at the specified network address and path.
func DialEchoServiceHTTPS ¶ added in v1.1.0
func DialEchoServiceHTTPS(network, address string, tlsConfig *tls.Config) (*EchoServiceClient, error)
DialEchoServiceHTTPS connects to an HTTPS RPC server at the specified network address listening on the default HTTP RPC path.
func DialEchoServiceHTTPSPath ¶ added in v1.1.0
func DialEchoServiceHTTPSPath(network, address, path string, tlsConfig *tls.Config) (*EchoServiceClient, error)
DialEchoServiceHTTPSPath connects to an HTTPS RPC server at the specified network address and path.
func DialEchoServiceTimeout ¶
func DialEchoServiceTimeout(network, addr string, timeout time.Duration) (*EchoServiceClient, error)
DialEchoServiceTimeout connects to an EchoService at the specified network address.
func NewEchoServiceClient ¶
func NewEchoServiceClient(conn io.ReadWriteCloser) *EchoServiceClient
NewEchoServiceClient returns a EchoService stub to handle requests to the set of EchoService at the other end of the connection.
func (*EchoServiceClient) AsyncEcho ¶
func (c *EchoServiceClient) AsyncEcho(in *EchoRequest, out *EchoResponse, done chan *rpc.Call) *rpc.Call
func (*EchoServiceClient) AsyncEchoTwice ¶
func (c *EchoServiceClient) AsyncEchoTwice(in *EchoRequest, out *EchoResponse, done chan *rpc.Call) *rpc.Call
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)