github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/orderer/sbft/backend/consensus.pb.go (about)

     1  // Code generated by protoc-gen-go.
     2  // source: backend/consensus.proto
     3  // DO NOT EDIT!
     4  
     5  /*
     6  Package backend is a generated protocol buffer package.
     7  
     8  It is generated from these files:
     9  	backend/consensus.proto
    10  
    11  It has these top-level messages:
    12  	Handshake
    13  */
    14  package backend
    15  
    16  import proto "github.com/golang/protobuf/proto"
    17  import fmt "fmt"
    18  import math "math"
    19  import simplebft "github.com/hyperledger/fabric/orderer/sbft/simplebft"
    20  
    21  import (
    22  	context "golang.org/x/net/context"
    23  	grpc "google.golang.org/grpc"
    24  )
    25  
    26  // Reference imports to suppress errors if they are not otherwise used.
    27  var _ = proto.Marshal
    28  var _ = fmt.Errorf
    29  var _ = math.Inf
    30  
    31  // This is a compile-time assertion to ensure that this generated file
    32  // is compatible with the proto package it is being compiled against.
    33  // A compilation error at this line likely means your copy of the
    34  // proto package needs to be updated.
    35  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    36  
    37  type Handshake struct {
    38  }
    39  
    40  func (m *Handshake) Reset()                    { *m = Handshake{} }
    41  func (m *Handshake) String() string            { return proto.CompactTextString(m) }
    42  func (*Handshake) ProtoMessage()               {}
    43  func (*Handshake) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    44  
    45  func init() {
    46  	proto.RegisterType((*Handshake)(nil), "backend.handshake")
    47  }
    48  
    49  // Reference imports to suppress errors if they are not otherwise used.
    50  var _ context.Context
    51  var _ grpc.ClientConn
    52  
    53  // This is a compile-time assertion to ensure that this generated file
    54  // is compatible with the grpc package it is being compiled against.
    55  const _ = grpc.SupportPackageIsVersion3
    56  
    57  // Client API for Consensus service
    58  
    59  type ConsensusClient interface {
    60  	Consensus(ctx context.Context, in *Handshake, opts ...grpc.CallOption) (Consensus_ConsensusClient, error)
    61  }
    62  
    63  type consensusClient struct {
    64  	cc *grpc.ClientConn
    65  }
    66  
    67  func NewConsensusClient(cc *grpc.ClientConn) ConsensusClient {
    68  	return &consensusClient{cc}
    69  }
    70  
    71  func (c *consensusClient) Consensus(ctx context.Context, in *Handshake, opts ...grpc.CallOption) (Consensus_ConsensusClient, error) {
    72  	stream, err := grpc.NewClientStream(ctx, &_Consensus_serviceDesc.Streams[0], c.cc, "/backend.consensus/consensus", opts...)
    73  	if err != nil {
    74  		return nil, err
    75  	}
    76  	x := &consensusConsensusClient{stream}
    77  	if err := x.ClientStream.SendMsg(in); err != nil {
    78  		return nil, err
    79  	}
    80  	if err := x.ClientStream.CloseSend(); err != nil {
    81  		return nil, err
    82  	}
    83  	return x, nil
    84  }
    85  
    86  type Consensus_ConsensusClient interface {
    87  	Recv() (*simplebft.MultiChainMsg, error)
    88  	grpc.ClientStream
    89  }
    90  
    91  type consensusConsensusClient struct {
    92  	grpc.ClientStream
    93  }
    94  
    95  func (x *consensusConsensusClient) Recv() (*simplebft.MultiChainMsg, error) {
    96  	m := new(simplebft.MultiChainMsg)
    97  	if err := x.ClientStream.RecvMsg(m); err != nil {
    98  		return nil, err
    99  	}
   100  	return m, nil
   101  }
   102  
   103  // Server API for Consensus service
   104  
   105  type ConsensusServer interface {
   106  	Consensus(*Handshake, Consensus_ConsensusServer) error
   107  }
   108  
   109  func RegisterConsensusServer(s *grpc.Server, srv ConsensusServer) {
   110  	s.RegisterService(&_Consensus_serviceDesc, srv)
   111  }
   112  
   113  func _Consensus_Consensus_Handler(srv interface{}, stream grpc.ServerStream) error {
   114  	m := new(Handshake)
   115  	if err := stream.RecvMsg(m); err != nil {
   116  		return err
   117  	}
   118  	return srv.(ConsensusServer).Consensus(m, &consensusConsensusServer{stream})
   119  }
   120  
   121  type Consensus_ConsensusServer interface {
   122  	Send(*simplebft.MultiChainMsg) error
   123  	grpc.ServerStream
   124  }
   125  
   126  type consensusConsensusServer struct {
   127  	grpc.ServerStream
   128  }
   129  
   130  func (x *consensusConsensusServer) Send(m *simplebft.MultiChainMsg) error {
   131  	return x.ServerStream.SendMsg(m)
   132  }
   133  
   134  var _Consensus_serviceDesc = grpc.ServiceDesc{
   135  	ServiceName: "backend.consensus",
   136  	HandlerType: (*ConsensusServer)(nil),
   137  	Methods:     []grpc.MethodDesc{},
   138  	Streams: []grpc.StreamDesc{
   139  		{
   140  			StreamName:    "consensus",
   141  			Handler:       _Consensus_Consensus_Handler,
   142  			ServerStreams: true,
   143  		},
   144  	},
   145  	Metadata: fileDescriptor0,
   146  }
   147  
   148  func init() { proto.RegisterFile("backend/consensus.proto", fileDescriptor0) }
   149  
   150  var fileDescriptor0 = []byte{
   151  	// 172 bytes of a gzipped FileDescriptorProto
   152  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0xce, 0xbd, 0xae, 0x82, 0x40,
   153  	0x10, 0x05, 0xe0, 0x7b, 0x1b, 0x0d, 0xd8, 0xd1, 0xa8, 0x94, 0x3c, 0xc0, 0x8e, 0x41, 0x5b, 0x1b,
   154  	0xed, 0x4c, 0x78, 0x01, 0xbb, 0xfd, 0x19, 0xd8, 0x0d, 0xb0, 0x4b, 0x66, 0x96, 0xc2, 0xb7, 0x37,
   155  	0x2a, 0x59, 0xed, 0x66, 0x72, 0x4e, 0xbe, 0x9c, 0x7c, 0xab, 0xa4, 0xee, 0xd1, 0x1b, 0xd0, 0xc1,
   156  	0x33, 0x7a, 0x9e, 0x59, 0x4c, 0x14, 0x62, 0x28, 0xd6, 0x4b, 0x50, 0xee, 0xd9, 0x8d, 0xd3, 0x80,
   157  	0xaa, 0x8d, 0x90, 0xae, 0x4f, 0xa7, 0xda, 0xe4, 0x99, 0x95, 0xde, 0xb0, 0x95, 0x3d, 0xd6, 0xb7,
   158  	0x3c, 0x4b, 0x46, 0x71, 0xfe, 0x7d, 0x0a, 0xb1, 0x58, 0x22, 0xb5, 0xcb, 0x9d, 0xf8, 0x62, 0xcd,
   159  	0x3c, 0x44, 0x77, 0xb5, 0xd2, 0xf9, 0x86, 0xbb, 0xea, 0xef, 0xf0, 0x7f, 0x39, 0xdd, 0xeb, 0xce,
   160  	0x45, 0x3b, 0x2b, 0xa1, 0xc3, 0x08, 0xf6, 0x31, 0x21, 0x0d, 0x68, 0x3a, 0x24, 0x68, 0xa5, 0x22,
   161  	0xa7, 0x21, 0x90, 0x41, 0x42, 0x02, 0x7e, 0xcd, 0x5a, 0x74, 0xb5, 0x7a, 0xaf, 0x3a, 0x3e, 0x03,
   162  	0x00, 0x00, 0xff, 0xff, 0x1d, 0x79, 0xa9, 0x9a, 0xd4, 0x00, 0x00, 0x00,
   163  }