1 Star 0 Fork 0

妥協/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
echo.pb.go 7.33 KB
一键复制 编辑 原始数据 按行查看 历史
Yoav Tock 提交于 2018-12-04 16:34 . FAB-13152 fix make protos
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: echo.proto
package testpb // import "github.com/hyperledger/fabric/common/grpcmetrics/testpb"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Message struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Sequence int32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) {
return fileDescriptor_echo_436b54e9f7a5436b, []int{0}
}
func (m *Message) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Message.Unmarshal(m, b)
}
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
}
func (dst *Message) XXX_Merge(src proto.Message) {
xxx_messageInfo_Message.Merge(dst, src)
}
func (m *Message) XXX_Size() int {
return xxx_messageInfo_Message.Size(m)
}
func (m *Message) XXX_DiscardUnknown() {
xxx_messageInfo_Message.DiscardUnknown(m)
}
var xxx_messageInfo_Message proto.InternalMessageInfo
func (m *Message) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func (m *Message) GetSequence() int32 {
if m != nil {
return m.Sequence
}
return 0
}
func init() {
proto.RegisterType((*Message)(nil), "testpb.Message")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// EchoServiceClient is the client API for EchoService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EchoServiceClient interface {
Echo(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
EchoStream(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoStreamClient, error)
}
type echoServiceClient struct {
cc *grpc.ClientConn
}
func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient {
return &echoServiceClient{cc}
}
func (c *echoServiceClient) Echo(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) {
out := new(Message)
err := c.cc.Invoke(ctx, "/testpb.EchoService/Echo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *echoServiceClient) EchoStream(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoStreamClient, error) {
stream, err := c.cc.NewStream(ctx, &_EchoService_serviceDesc.Streams[0], "/testpb.EchoService/EchoStream", opts...)
if err != nil {
return nil, err
}
x := &echoServiceEchoStreamClient{stream}
return x, nil
}
type EchoService_EchoStreamClient interface {
Send(*Message) error
Recv() (*Message, error)
grpc.ClientStream
}
type echoServiceEchoStreamClient struct {
grpc.ClientStream
}
func (x *echoServiceEchoStreamClient) Send(m *Message) error {
return x.ClientStream.SendMsg(m)
}
func (x *echoServiceEchoStreamClient) Recv() (*Message, error) {
m := new(Message)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// EchoServiceServer is the server API for EchoService service.
type EchoServiceServer interface {
Echo(context.Context, *Message) (*Message, error)
EchoStream(EchoService_EchoStreamServer) error
}
func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer) {
s.RegisterService(&_EchoService_serviceDesc, srv)
}
func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Message)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EchoServiceServer).Echo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/testpb.EchoService/Echo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EchoServiceServer).Echo(ctx, req.(*Message))
}
return interceptor(ctx, in, info, handler)
}
func _EchoService_EchoStream_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(EchoServiceServer).EchoStream(&echoServiceEchoStreamServer{stream})
}
type EchoService_EchoStreamServer interface {
Send(*Message) error
Recv() (*Message, error)
grpc.ServerStream
}
type echoServiceEchoStreamServer struct {
grpc.ServerStream
}
func (x *echoServiceEchoStreamServer) Send(m *Message) error {
return x.ServerStream.SendMsg(m)
}
func (x *echoServiceEchoStreamServer) Recv() (*Message, error) {
m := new(Message)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _EchoService_serviceDesc = grpc.ServiceDesc{
ServiceName: "testpb.EchoService",
HandlerType: (*EchoServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Echo",
Handler: _EchoService_Echo_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "EchoStream",
Handler: _EchoService_EchoStream_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "echo.proto",
}
func init() { proto.RegisterFile("echo.proto", fileDescriptor_echo_436b54e9f7a5436b) }
var fileDescriptor_echo_436b54e9f7a5436b = []byte{
// 196 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liurenhao/fabric.git
git@gitee.com:liurenhao/fabric.git
liurenhao
fabric
fabric
v1.4.3

搜索帮助