// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.6.1 // source: raftpb.proto package proto import ( context "context" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // This is a compile-time assertion that a sufficiently up-to-date version // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 type Null struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *Null) Reset() { *x = Null{} if protoimpl.UnsafeEnabled { mi := &file_raftpb_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Null) String() string { return protoimpl.X.MessageStringOf(x) } func (*Null) ProtoMessage() {} func (x *Null) ProtoReflect() protoreflect.Message { mi := &file_raftpb_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Null.ProtoReflect.Descriptor instead. func (*Null) Descriptor() ([]byte, []int) { return file_raftpb_proto_rawDescGZIP(), []int{0} } type AddressState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AddressMap []byte `protobuf:"bytes,1,opt,name=address_map,json=addressMap,proto3" json:"address_map,omitempty"` } func (x *AddressState) Reset() { *x = AddressState{} if protoimpl.UnsafeEnabled { mi := &file_raftpb_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AddressState) String() string { return protoimpl.X.MessageStringOf(x) } func (*AddressState) ProtoMessage() {} func (x *AddressState) ProtoReflect() protoreflect.Message { mi := &file_raftpb_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AddressState.ProtoReflect.Descriptor instead. func (*AddressState) Descriptor() ([]byte, []int) { return file_raftpb_proto_rawDescGZIP(), []int{1} } func (x *AddressState) GetAddressMap() []byte { if x != nil { return x.AddressMap } return nil } type ChangeReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields State State `protobuf:"varint,1,opt,name=state,proto3,enum=bayard.common.State" json:"state,omitempty"` AddressMap []byte `protobuf:"bytes,2,opt,name=address_map,json=addressMap,proto3" json:"address_map,omitempty"` LeaderId uint64 `protobuf:"varint,3,opt,name=leader_id,json=leaderId,proto3" json:"leader_id,omitempty"` } func (x *ChangeReply) Reset() { *x = ChangeReply{} if protoimpl.UnsafeEnabled { mi := &file_raftpb_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ChangeReply) String() string { return protoimpl.X.MessageStringOf(x) } func (*ChangeReply) ProtoMessage() {} func (x *ChangeReply) ProtoReflect() protoreflect.Message { mi := &file_raftpb_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ChangeReply.ProtoReflect.Descriptor instead. func (*ChangeReply) Descriptor() ([]byte, []int) { return file_raftpb_proto_rawDescGZIP(), []int{2} } func (x *ChangeReply) GetState() State { if x != nil { return x.State } return State_OK } func (x *ChangeReply) GetAddressMap() []byte { if x != nil { return x.AddressMap } return nil } func (x *ChangeReply) GetLeaderId() uint64 { if x != nil { return x.LeaderId } return 0 } var File_raftpb_proto protoreflect.FileDescriptor var file_raftpb_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x72, 0x61, 0x66, 0x74, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x61, 0x79, 0x61, 0x72, 0x64, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x1a, 0x0d, 0x65, 0x72, 0x61, 0x66, 0x74, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x06, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x2f, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x70, 0x22, 0x77, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x79, 0x61, 0x72, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x32, 0xf3, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x66, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x11, 0x2e, 0x65, 0x72, 0x61, 0x66, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x61, 0x79, 0x61, 0x72, 0x64, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x13, 0x2e, 0x65, 0x72, 0x61, 0x66, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0x18, 0x2e, 0x62, 0x61, 0x79, 0x61, 0x72, 0x64, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x10, 0x2e, 0x65, 0x72, 0x61, 0x66, 0x74, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x11, 0x2e, 0x62, 0x61, 0x79, 0x61, 0x72, 0x64, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x19, 0x2e, 0x62, 0x61, 0x79, 0x61, 0x72, 0x64, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x11, 0x2e, 0x62, 0x61, 0x79, 0x61, 0x72, 0x64, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_raftpb_proto_rawDescOnce sync.Once file_raftpb_proto_rawDescData = file_raftpb_proto_rawDesc ) func file_raftpb_proto_rawDescGZIP() []byte { file_raftpb_proto_rawDescOnce.Do(func() { file_raftpb_proto_rawDescData = protoimpl.X.CompressGZIP(file_raftpb_proto_rawDescData) }) return file_raftpb_proto_rawDescData } var file_raftpb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_raftpb_proto_goTypes = []interface{}{ (*Null)(nil), // 0: bayard.raft.Null (*AddressState)(nil), // 1: bayard.raft.AddressState (*ChangeReply)(nil), // 2: bayard.raft.ChangeReply (State)(0), // 3: bayard.common.State (*Snapshot)(nil), // 4: eraftpb.Snapshot (*ConfChange)(nil), // 5: eraftpb.ConfChange (*Message)(nil), // 6: eraftpb.Message } var file_raftpb_proto_depIdxs = []int32{ 3, // 0: bayard.raft.ChangeReply.state:type_name -> bayard.common.State 4, // 1: bayard.raft.RaftService.Snapshot:input_type -> eraftpb.Snapshot 5, // 2: bayard.raft.RaftService.ChangeConfig:input_type -> eraftpb.ConfChange 6, // 3: bayard.raft.RaftService.SendMsg:input_type -> eraftpb.Message 1, // 4: bayard.raft.RaftService.SendAddress:input_type -> bayard.raft.AddressState 0, // 5: bayard.raft.RaftService.Snapshot:output_type -> bayard.raft.Null 2, // 6: bayard.raft.RaftService.ChangeConfig:output_type -> bayard.raft.ChangeReply 0, // 7: bayard.raft.RaftService.SendMsg:output_type -> bayard.raft.Null 0, // 8: bayard.raft.RaftService.SendAddress:output_type -> bayard.raft.Null 5, // [5:9] is the sub-list for method output_type 1, // [1:5] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_raftpb_proto_init() } func file_raftpb_proto_init() { if File_raftpb_proto != nil { return } file_eraftpb_proto_init() file_commonpb_proto_init() if !protoimpl.UnsafeEnabled { file_raftpb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Null); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_raftpb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddressState); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_raftpb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChangeReply); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_raftpb_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, GoTypes: file_raftpb_proto_goTypes, DependencyIndexes: file_raftpb_proto_depIdxs, MessageInfos: file_raftpb_proto_msgTypes, }.Build() File_raftpb_proto = out.File file_raftpb_proto_rawDesc = nil file_raftpb_proto_goTypes = nil file_raftpb_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConnInterface // 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.SupportPackageIsVersion6 // RaftServiceClient is the client API for RaftService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type RaftServiceClient interface { Snapshot(ctx context.Context, in *Snapshot, opts ...grpc.CallOption) (*Null, error) ChangeConfig(ctx context.Context, in *ConfChange, opts ...grpc.CallOption) (*ChangeReply, error) SendMsg(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Null, error) SendAddress(ctx context.Context, in *AddressState, opts ...grpc.CallOption) (*Null, error) } type raftServiceClient struct { cc grpc.ClientConnInterface } func NewRaftServiceClient(cc grpc.ClientConnInterface) RaftServiceClient { return &raftServiceClient{cc} } func (c *raftServiceClient) Snapshot(ctx context.Context, in *Snapshot, opts ...grpc.CallOption) (*Null, error) { out := new(Null) err := c.cc.Invoke(ctx, "/bayard.raft.RaftService/Snapshot", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *raftServiceClient) ChangeConfig(ctx context.Context, in *ConfChange, opts ...grpc.CallOption) (*ChangeReply, error) { out := new(ChangeReply) err := c.cc.Invoke(ctx, "/bayard.raft.RaftService/ChangeConfig", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *raftServiceClient) SendMsg(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Null, error) { out := new(Null) err := c.cc.Invoke(ctx, "/bayard.raft.RaftService/SendMsg", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *raftServiceClient) SendAddress(ctx context.Context, in *AddressState, opts ...grpc.CallOption) (*Null, error) { out := new(Null) err := c.cc.Invoke(ctx, "/bayard.raft.RaftService/SendAddress", in, out, opts...) if err != nil { return nil, err } return out, nil } // RaftServiceServer is the server API for RaftService service. type RaftServiceServer interface { Snapshot(context.Context, *Snapshot) (*Null, error) ChangeConfig(context.Context, *ConfChange) (*ChangeReply, error) SendMsg(context.Context, *Message) (*Null, error) SendAddress(context.Context, *AddressState) (*Null, error) } // UnimplementedRaftServiceServer can be embedded to have forward compatible implementations. type UnimplementedRaftServiceServer struct { } func (*UnimplementedRaftServiceServer) Snapshot(context.Context, *Snapshot) (*Null, error) { return nil, status.Errorf(codes.Unimplemented, "method Snapshot not implemented") } func (*UnimplementedRaftServiceServer) ChangeConfig(context.Context, *ConfChange) (*ChangeReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeConfig not implemented") } func (*UnimplementedRaftServiceServer) SendMsg(context.Context, *Message) (*Null, error) { return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented") } func (*UnimplementedRaftServiceServer) SendAddress(context.Context, *AddressState) (*Null, error) { return nil, status.Errorf(codes.Unimplemented, "method SendAddress not implemented") } func RegisterRaftServiceServer(s *grpc.Server, srv RaftServiceServer) { s.RegisterService(&_RaftService_serviceDesc, srv) } func _RaftService_Snapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Snapshot) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RaftServiceServer).Snapshot(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/bayard.raft.RaftService/Snapshot", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RaftServiceServer).Snapshot(ctx, req.(*Snapshot)) } return interceptor(ctx, in, info, handler) } func _RaftService_ChangeConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ConfChange) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RaftServiceServer).ChangeConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/bayard.raft.RaftService/ChangeConfig", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RaftServiceServer).ChangeConfig(ctx, req.(*ConfChange)) } return interceptor(ctx, in, info, handler) } func _RaftService_SendMsg_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.(RaftServiceServer).SendMsg(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/bayard.raft.RaftService/SendMsg", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RaftServiceServer).SendMsg(ctx, req.(*Message)) } return interceptor(ctx, in, info, handler) } func _RaftService_SendAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddressState) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RaftServiceServer).SendAddress(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/bayard.raft.RaftService/SendAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RaftServiceServer).SendAddress(ctx, req.(*AddressState)) } return interceptor(ctx, in, info, handler) } var _RaftService_serviceDesc = grpc.ServiceDesc{ ServiceName: "bayard.raft.RaftService", HandlerType: (*RaftServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Snapshot", Handler: _RaftService_Snapshot_Handler, }, { MethodName: "ChangeConfig", Handler: _RaftService_ChangeConfig_Handler, }, { MethodName: "SendMsg", Handler: _RaftService_SendMsg_Handler, }, { MethodName: "SendAddress", Handler: _RaftService_SendAddress_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "raftpb.proto", }