example

package
v0.0.0-...-c2ea7bb Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package example is a generated protocol buffer package.

It is generated from these files:

example/greeter.proto

It has these top-level messages:

HelloRequest
HelloReply

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMultiGreeterServer

func RegisterMultiGreeterServer(s *grpc.Server, srv MultiGreeterServer)

Types

type HelloReply

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

A response message containing a greeting

func (*HelloReply) Descriptor

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

func (*HelloReply) GetMessage

func (m *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) Reset

func (m *HelloReply) Reset()

func (*HelloReply) String

func (m *HelloReply) String() string

type HelloRequest

type HelloRequest struct {
	Name         string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	NumGreetings uint32 `protobuf:"varint,2,opt,name=num_greetings,json=numGreetings" json:"num_greetings,omitempty"`
}

The request message containing the user's name and how many greetings they want.

func (*HelloRequest) Descriptor

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

func (*HelloRequest) GetName

func (m *HelloRequest) GetName() string

func (*HelloRequest) GetNumGreetings

func (m *HelloRequest) GetNumGreetings() uint32

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) String

func (m *HelloRequest) String() string

type MultiGreeterClient

type MultiGreeterClient interface {
	// Sends multiple greetings
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (MultiGreeter_SayHelloClient, error)
}

func NewMultiGreeterClient

func NewMultiGreeterClient(cc *grpc.ClientConn) MultiGreeterClient

type MultiGreeterServer

type MultiGreeterServer interface {
	// Sends multiple greetings
	SayHello(*HelloRequest, MultiGreeter_SayHelloServer) error
}

type MultiGreeter_SayHelloClient

type MultiGreeter_SayHelloClient interface {
	Recv() (*HelloReply, error)
	grpc.ClientStream
}

type MultiGreeter_SayHelloServer

type MultiGreeter_SayHelloServer interface {
	Send(*HelloReply) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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