// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cluster.proto

package consensus

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	math "math"
)

// 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.ProtoPackageIsVersion3 // please upgrade the proto package

type NodeInfo struct {
	NodeId               string   `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	RaftAddr             string   `protobuf:"bytes,2,opt,name=raft_addr,json=raftAddr,proto3" json:"raft_addr,omitempty"`
	MgmtAddr             string   `protobuf:"bytes,3,opt,name=mgmt_addr,json=mgmtAddr,proto3" json:"mgmt_addr,omitempty"`
	HttpAddr             string   `protobuf:"bytes,4,opt,name=http_addr,json=httpAddr,proto3" json:"http_addr,omitempty"`
	MetricsAddr          string   `protobuf:"bytes,5,opt,name=metrics_addr,json=metricsAddr,proto3" json:"metrics_addr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *NodeInfo) Reset()         { *m = NodeInfo{} }
func (m *NodeInfo) String() string { return proto.CompactTextString(m) }
func (*NodeInfo) ProtoMessage()    {}
func (*NodeInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{0}
}

func (m *NodeInfo) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_NodeInfo.Unmarshal(m, b)
}
func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic)
}
func (m *NodeInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_NodeInfo.Merge(m, src)
}
func (m *NodeInfo) XXX_Size() int {
	return xxx_messageInfo_NodeInfo.Size(m)
}
func (m *NodeInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_NodeInfo.DiscardUnknown(m)
}

var xxx_messageInfo_NodeInfo proto.InternalMessageInfo

func (m *NodeInfo) GetNodeId() string {
	if m != nil {
		return m.NodeId
	}
	return ""
}

func (m *NodeInfo) GetRaftAddr() string {
	if m != nil {
		return m.RaftAddr
	}
	return ""
}

func (m *NodeInfo) GetMgmtAddr() string {
	if m != nil {
		return m.MgmtAddr
	}
	return ""
}

func (m *NodeInfo) GetHttpAddr() string {
	if m != nil {
		return m.HttpAddr
	}
	return ""
}

func (m *NodeInfo) GetMetricsAddr() string {
	if m != nil {
		return m.MetricsAddr
	}
	return ""
}

type ClusterInfo struct {
	LeaderId             string               `protobuf:"bytes,1,opt,name=leader_id,json=leaderId,proto3" json:"leader_id,omitempty"`
	Nodes                map[string]*NodeInfo `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (m *ClusterInfo) Reset()         { *m = ClusterInfo{} }
func (m *ClusterInfo) String() string { return proto.CompactTextString(m) }
func (*ClusterInfo) ProtoMessage()    {}
func (*ClusterInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{1}
}

func (m *ClusterInfo) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ClusterInfo.Unmarshal(m, b)
}
func (m *ClusterInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ClusterInfo.Marshal(b, m, deterministic)
}
func (m *ClusterInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ClusterInfo.Merge(m, src)
}
func (m *ClusterInfo) XXX_Size() int {
	return xxx_messageInfo_ClusterInfo.Size(m)
}
func (m *ClusterInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_ClusterInfo.DiscardUnknown(m)
}

var xxx_messageInfo_ClusterInfo proto.InternalMessageInfo

func (m *ClusterInfo) GetLeaderId() string {
	if m != nil {
		return m.LeaderId
	}
	return ""
}

func (m *ClusterInfo) GetNodes() map[string]*NodeInfo {
	if m != nil {
		return m.Nodes
	}
	return nil
}

type RaftJoinRequest struct {
	NodeId               string   `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	RaftAddr             string   `protobuf:"bytes,2,opt,name=raft_addr,json=raftAddr,proto3" json:"raft_addr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *RaftJoinRequest) Reset()         { *m = RaftJoinRequest{} }
func (m *RaftJoinRequest) String() string { return proto.CompactTextString(m) }
func (*RaftJoinRequest) ProtoMessage()    {}
func (*RaftJoinRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{2}
}

func (m *RaftJoinRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_RaftJoinRequest.Unmarshal(m, b)
}
func (m *RaftJoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_RaftJoinRequest.Marshal(b, m, deterministic)
}
func (m *RaftJoinRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RaftJoinRequest.Merge(m, src)
}
func (m *RaftJoinRequest) XXX_Size() int {
	return xxx_messageInfo_RaftJoinRequest.Size(m)
}
func (m *RaftJoinRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_RaftJoinRequest.DiscardUnknown(m)
}

var xxx_messageInfo_RaftJoinRequest proto.InternalMessageInfo

func (m *RaftJoinRequest) GetNodeId() string {
	if m != nil {
		return m.NodeId
	}
	return ""
}

func (m *RaftJoinRequest) GetRaftAddr() string {
	if m != nil {
		return m.RaftAddr
	}
	return ""
}

type RaftJoinResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *RaftJoinResponse) Reset()         { *m = RaftJoinResponse{} }
func (m *RaftJoinResponse) String() string { return proto.CompactTextString(m) }
func (*RaftJoinResponse) ProtoMessage()    {}
func (*RaftJoinResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{3}
}

func (m *RaftJoinResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_RaftJoinResponse.Unmarshal(m, b)
}
func (m *RaftJoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_RaftJoinResponse.Marshal(b, m, deterministic)
}
func (m *RaftJoinResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RaftJoinResponse.Merge(m, src)
}
func (m *RaftJoinResponse) XXX_Size() int {
	return xxx_messageInfo_RaftJoinResponse.Size(m)
}
func (m *RaftJoinResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_RaftJoinResponse.DiscardUnknown(m)
}

var xxx_messageInfo_RaftJoinResponse proto.InternalMessageInfo

type FetchSnapshotRequest struct {
	LastAppliedVersion   uint64   `protobuf:"varint,1,opt,name=lastAppliedVersion,proto3" json:"lastAppliedVersion,omitempty"`
	StartSeqNum          uint64   `protobuf:"varint,2,opt,name=startSeqNum,proto3" json:"startSeqNum,omitempty"`
	EndSeqNum            uint64   `protobuf:"varint,3,opt,name=endSeqNum,proto3" json:"endSeqNum,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *FetchSnapshotRequest) Reset()         { *m = FetchSnapshotRequest{} }
func (m *FetchSnapshotRequest) String() string { return proto.CompactTextString(m) }
func (*FetchSnapshotRequest) ProtoMessage()    {}
func (*FetchSnapshotRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{4}
}

func (m *FetchSnapshotRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_FetchSnapshotRequest.Unmarshal(m, b)
}
func (m *FetchSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_FetchSnapshotRequest.Marshal(b, m, deterministic)
}
func (m *FetchSnapshotRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FetchSnapshotRequest.Merge(m, src)
}
func (m *FetchSnapshotRequest) XXX_Size() int {
	return xxx_messageInfo_FetchSnapshotRequest.Size(m)
}
func (m *FetchSnapshotRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_FetchSnapshotRequest.DiscardUnknown(m)
}

var xxx_messageInfo_FetchSnapshotRequest proto.InternalMessageInfo

func (m *FetchSnapshotRequest) GetLastAppliedVersion() uint64 {
	if m != nil {
		return m.LastAppliedVersion
	}
	return 0
}

func (m *FetchSnapshotRequest) GetStartSeqNum() uint64 {
	if m != nil {
		return m.StartSeqNum
	}
	return 0
}

func (m *FetchSnapshotRequest) GetEndSeqNum() uint64 {
	if m != nil {
		return m.EndSeqNum
	}
	return 0
}

type Chunk struct {
	Content              []byte   `protobuf:"bytes,1,opt,name=Content,proto3" json:"Content,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Chunk) Reset()         { *m = Chunk{} }
func (m *Chunk) String() string { return proto.CompactTextString(m) }
func (*Chunk) ProtoMessage()    {}
func (*Chunk) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{5}
}

func (m *Chunk) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Chunk.Unmarshal(m, b)
}
func (m *Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Chunk.Marshal(b, m, deterministic)
}
func (m *Chunk) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Chunk.Merge(m, src)
}
func (m *Chunk) XXX_Size() int {
	return xxx_messageInfo_Chunk.Size(m)
}
func (m *Chunk) XXX_DiscardUnknown() {
	xxx_messageInfo_Chunk.DiscardUnknown(m)
}

var xxx_messageInfo_Chunk proto.InternalMessageInfo

func (m *Chunk) GetContent() []byte {
	if m != nil {
		return m.Content
	}
	return nil
}

type InfoResponse struct {
	NodeInfo             *NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (m *InfoResponse) Reset()         { *m = InfoResponse{} }
func (m *InfoResponse) String() string { return proto.CompactTextString(m) }
func (*InfoResponse) ProtoMessage()    {}
func (*InfoResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{6}
}

func (m *InfoResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_InfoResponse.Unmarshal(m, b)
}
func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_InfoResponse.Marshal(b, m, deterministic)
}
func (m *InfoResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_InfoResponse.Merge(m, src)
}
func (m *InfoResponse) XXX_Size() int {
	return xxx_messageInfo_InfoResponse.Size(m)
}
func (m *InfoResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_InfoResponse.DiscardUnknown(m)
}

var xxx_messageInfo_InfoResponse proto.InternalMessageInfo

func (m *InfoResponse) GetNodeInfo() *NodeInfo {
	if m != nil {
		return m.NodeInfo
	}
	return nil
}

type InfoRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *InfoRequest) Reset()         { *m = InfoRequest{} }
func (m *InfoRequest) String() string { return proto.CompactTextString(m) }
func (*InfoRequest) ProtoMessage()    {}
func (*InfoRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_3cfb3b8ec240c376, []int{7}
}

func (m *InfoRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_InfoRequest.Unmarshal(m, b)
}
func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_InfoRequest.Marshal(b, m, deterministic)
}
func (m *InfoRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_InfoRequest.Merge(m, src)
}
func (m *InfoRequest) XXX_Size() int {
	return xxx_messageInfo_InfoRequest.Size(m)
}
func (m *InfoRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_InfoRequest.DiscardUnknown(m)
}

var xxx_messageInfo_InfoRequest proto.InternalMessageInfo

func init() {
	proto.RegisterType((*NodeInfo)(nil), "consensus.NodeInfo")
	proto.RegisterType((*ClusterInfo)(nil), "consensus.ClusterInfo")
	proto.RegisterMapType((map[string]*NodeInfo)(nil), "consensus.ClusterInfo.NodesEntry")
	proto.RegisterType((*RaftJoinRequest)(nil), "consensus.RaftJoinRequest")
	proto.RegisterType((*RaftJoinResponse)(nil), "consensus.RaftJoinResponse")
	proto.RegisterType((*FetchSnapshotRequest)(nil), "consensus.FetchSnapshotRequest")
	proto.RegisterType((*Chunk)(nil), "consensus.Chunk")
	proto.RegisterType((*InfoResponse)(nil), "consensus.InfoResponse")
	proto.RegisterType((*InfoRequest)(nil), "consensus.InfoRequest")
}

func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) }

var fileDescriptor_3cfb3b8ec240c376 = []byte{
	// 481 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0xd3, 0x40,
	0x10, 0xc6, 0xe5, 0xfc,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b, 0x1a, 0x41, 0x60, 0x3b, 0x98, 0x1d, 0x17, 0x3f, 0x3d, 0x78, 0xe0, 0xae, 0x72, 0x8d,
	0xe2, 0x2e, 0xcf, 0x90, 0x5c, 0x42, 0xa0, 0xf3, 0x71, 0x2a, 0x09, 0x5b, 0xfd, 0xfe, 0xb8, 0x84,
	0x70, 0x7a, 0x90, 0x39, 0x6f, 0x6f, 0x61, 0xf4, 0x5b, 0xac, 0xe4, 0x59, 0xab, 0xfa, 0x50, 0xe0,
	0xe1, 0xb8, 0xfd, 0x7f, 0xe9, 0x24, 0xce, 0x3c, 0x72, 0xee, 0xba, 0xec, 0xdf, 0xd4, 0x93, 0x56,
	0x51, 0x6b, 0x93, 0xf0, 0xe4, 0x2f, 0xdd, 0xfa, 0x78, 0x13, 0x7c, 0x6e, 0x9e, 0xe7, 0x97, 0x23,
	0xf3, 0x60, 0x5f, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x96, 0xe2, 0xd1, 0xdc, 0xc1, 0x03, 0x00,
	0x00,
}

// 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

// ClusterServiceClient is the client API for ClusterService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ClusterServiceClient interface {
	JoinCluster(ctx context.Context, in *RaftJoinRequest, opts ...grpc.CallOption) (*RaftJoinResponse, error)
	FetchSnapshot(ctx context.Context, in *FetchSnapshotRequest, opts ...grpc.CallOption) (ClusterService_FetchSnapshotClient, error)
	FetchNodeInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
}

type clusterServiceClient struct {
	cc *grpc.ClientConn
}

func NewClusterServiceClient(cc *grpc.ClientConn) ClusterServiceClient {
	return &clusterServiceClient{cc}
}

func (c *clusterServiceClient) JoinCluster(ctx context.Context, in *RaftJoinRequest, opts ...grpc.CallOption) (*RaftJoinResponse, error) {
	out := new(RaftJoinResponse)
	err := c.cc.Invoke(ctx, "/consensus.ClusterService/JoinCluster", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterServiceClient) FetchSnapshot(ctx context.Context, in *FetchSnapshotRequest, opts ...grpc.CallOption) (ClusterService_FetchSnapshotClient, error) {
	stream, err := c.cc.NewStream(ctx, &_ClusterService_serviceDesc.Streams[0], "/consensus.ClusterService/FetchSnapshot", opts...)
	if err != nil {
		return nil, err
	}
	x := &clusterServiceFetchSnapshotClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type ClusterService_FetchSnapshotClient interface {
	Recv() (*Chunk, error)
	grpc.ClientStream
}

type clusterServiceFetchSnapshotClient struct {
	grpc.ClientStream
}

func (x *clusterServiceFetchSnapshotClient) Recv() (*Chunk, error) {
	m := new(Chunk)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *clusterServiceClient) FetchNodeInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) {
	out := new(InfoResponse)
	err := c.cc.Invoke(ctx, "/consensus.ClusterService/FetchNodeInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ClusterServiceServer is the server API for ClusterService service.
type ClusterServiceServer interface {
	JoinCluster(context.Context, *RaftJoinRequest) (*RaftJoinResponse, error)
	FetchSnapshot(*FetchSnapshotRequest, ClusterService_FetchSnapshotServer) error
	FetchNodeInfo(context.Context, *InfoRequest) (*InfoResponse, error)
}

// UnimplementedClusterServiceServer can be embedded to have forward compatible implementations.
type UnimplementedClusterServiceServer struct {
}

func (*UnimplementedClusterServiceServer) JoinCluster(ctx context.Context, req *RaftJoinRequest) (*RaftJoinResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method JoinCluster not implemented")
}
func (*UnimplementedClusterServiceServer) FetchSnapshot(req *FetchSnapshotRequest, srv ClusterService_FetchSnapshotServer) error {
	return status.Errorf(codes.Unimplemented, "method FetchSnapshot not implemented")
}
func (*UnimplementedClusterServiceServer) FetchNodeInfo(ctx context.Context, req *InfoRequest) (*InfoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method FetchNodeInfo not implemented")
}

func RegisterClusterServiceServer(s *grpc.Server, srv ClusterServiceServer) {
	s.RegisterService(&_ClusterService_serviceDesc, srv)
}

func _ClusterService_JoinCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RaftJoinRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServiceServer).JoinCluster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/consensus.ClusterService/JoinCluster",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServiceServer).JoinCluster(ctx, req.(*RaftJoinRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ClusterService_FetchSnapshot_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(FetchSnapshotRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(ClusterServiceServer).FetchSnapshot(m, &clusterServiceFetchSnapshotServer{stream})
}

type ClusterService_FetchSnapshotServer interface {
	Send(*Chunk) error
	grpc.ServerStream
}

type clusterServiceFetchSnapshotServer struct {
	grpc.ServerStream
}

func (x *clusterServiceFetchSnapshotServer) Send(m *Chunk) error {
	return x.ServerStream.SendMsg(m)
}

func _ClusterService_FetchNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InfoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServiceServer).FetchNodeInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/consensus.ClusterService/FetchNodeInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServiceServer).FetchNodeInfo(ctx, req.(*InfoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _ClusterService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "consensus.ClusterService",
	HandlerType: (*ClusterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "JoinCluster",
			Handler:    _ClusterService_JoinCluster_Handler,
		},
		{
			MethodName: "FetchNodeInfo",
			Handler:    _ClusterService_FetchNodeInfo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "FetchSnapshot",
			Handler:       _ClusterService_FetchSnapshot_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "cluster.proto",
}
