demo

package
v0.0.0-...-fde848d Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package demo is a generated protocol buffer package.

It is generated from these files:

demo.proto

It has these top-level messages:

EchoReq
EchoResp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDemoServer

func RegisterDemoServer(s *grpc.Server, srv DemoServer)

Types

type Client

type Client struct {
	ServerAddr string

	GRPCConn   *grpc.ClientConn
	GRPCClient DemoClient
}

Client is a Demo Client

func NewClient

func NewClient(addr string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

Close close Demo.Client

func (*Client) Echo

func (c *Client) Echo(ctx context.Context, req *EchoReq) (*EchoResp, error)

Echo call Demo.Echo with gRPC

type DemoClient

type DemoClient interface {
	Echo(ctx context.Context, in *EchoReq, opts ...grpc.CallOption) (*EchoResp, error)
}

func NewDemoClient

func NewDemoClient(cc *grpc.ClientConn) DemoClient

type DemoServer

type DemoServer interface {
	Echo(context.Context, *EchoReq) (*EchoResp, error)
}

type EchoReq

type EchoReq struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (*EchoReq) Descriptor

func (*EchoReq) Descriptor() ([]byte, []int)

func (*EchoReq) GetMessage

func (m *EchoReq) GetMessage() string

func (*EchoReq) ProtoMessage

func (*EchoReq) ProtoMessage()

func (*EchoReq) Reset

func (m *EchoReq) Reset()

func (*EchoReq) String

func (m *EchoReq) String() string

type EchoResp

type EchoResp struct {
	Result string `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
}

func (*EchoResp) Descriptor

func (*EchoResp) Descriptor() ([]byte, []int)

func (*EchoResp) GetResult

func (m *EchoResp) GetResult() string

func (*EchoResp) ProtoMessage

func (*EchoResp) ProtoMessage()

func (*EchoResp) Reset

func (m *EchoResp) Reset()

func (*EchoResp) String

func (m *EchoResp) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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