hello

package
v0.0.0-...-fa9b265 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package hello is a generated protocol buffer package.

It is generated from these files:

hello.proto

It has these top-level messages:

HelloRequest
HelloResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHelloServer

func RegisterHelloServer(srv HelloServer, cfg *config.BaseCfg)

RegisterHelloServer register HelloServer with etcd info

Types

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty" xml:"name,omitempty"`
}

HelloRequest 请求结构

func (*HelloRequest) Descriptor

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

func (*HelloRequest) Get

func (r *HelloRequest) Get() []byte

Get 实现Raw接口

func (*HelloRequest) GetName

func (m *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) Set

func (r *HelloRequest) Set(b []byte) error

Set 实现Raw接口

func (*HelloRequest) String

func (m *HelloRequest) String() string

type HelloResponse

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

HelloResponse 响应结构

func SayHello

func SayHello(ctx context.Context, in *HelloRequest) (*HelloResponse, error)

SayHello 定义SayHello方法

func (*HelloResponse) Descriptor

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

func (*HelloResponse) Get

func (r *HelloResponse) Get() []byte

Get 实现Raw接口

func (*HelloResponse) GetMessage

func (m *HelloResponse) GetMessage() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) Reset

func (m *HelloResponse) Reset()

func (*HelloResponse) Set

func (r *HelloResponse) Set(b []byte) error

Set 实现Raw接口

func (*HelloResponse) String

func (m *HelloResponse) String() string

type HelloServer

type HelloServer interface {
	SayHello(ctx context.Context, in *HelloRequest) (*HelloResponse, error)
}

HelloServer Server API for Hello service

Jump to

Keyboard shortcuts

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