Documentation ¶
Index ¶
- Variables
- func RegisterRaftServer(s *grpc.Server, srv RaftServer)
- type ApplyRequest
- type ApplyResponse
- type GetDetailsRequest
- type GetDetailsResponse
- func (*GetDetailsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetDetailsResponse) GetDiscoveryPort() int32
- func (x *GetDetailsResponse) GetServerId() string
- func (*GetDetailsResponse) ProtoMessage()
- func (x *GetDetailsResponse) ProtoReflect() protoreflect.Message
- func (x *GetDetailsResponse) Reset()
- func (x *GetDetailsResponse) String() string
- type RaftClient
- type RaftServer
- type UnimplementedRaftServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_raft_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRaftServer ¶
func RegisterRaftServer(s *grpc.Server, srv RaftServer)
Types ¶
type ApplyRequest ¶
type ApplyRequest struct { Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // contains filtered or unexported fields }
func (*ApplyRequest) Descriptor
deprecated
func (*ApplyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead.
func (*ApplyRequest) GetRequest ¶
func (x *ApplyRequest) GetRequest() []byte
func (*ApplyRequest) ProtoMessage ¶
func (*ApplyRequest) ProtoMessage()
func (*ApplyRequest) ProtoReflect ¶
func (x *ApplyRequest) ProtoReflect() protoreflect.Message
func (*ApplyRequest) Reset ¶
func (x *ApplyRequest) Reset()
func (*ApplyRequest) String ¶
func (x *ApplyRequest) String() string
type ApplyResponse ¶
type ApplyResponse struct { Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*ApplyResponse) Descriptor
deprecated
func (*ApplyResponse) Descriptor() ([]byte, []int)
Deprecated: Use ApplyResponse.ProtoReflect.Descriptor instead.
func (*ApplyResponse) GetResponse ¶
func (x *ApplyResponse) GetResponse() []byte
func (*ApplyResponse) ProtoMessage ¶
func (*ApplyResponse) ProtoMessage()
func (*ApplyResponse) ProtoReflect ¶
func (x *ApplyResponse) ProtoReflect() protoreflect.Message
func (*ApplyResponse) Reset ¶
func (x *ApplyResponse) Reset()
func (*ApplyResponse) String ¶
func (x *ApplyResponse) String() string
type GetDetailsRequest ¶
type GetDetailsRequest struct {
// contains filtered or unexported fields
}
func (*GetDetailsRequest) Descriptor
deprecated
func (*GetDetailsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetDetailsRequest.ProtoReflect.Descriptor instead.
func (*GetDetailsRequest) ProtoMessage ¶
func (*GetDetailsRequest) ProtoMessage()
func (*GetDetailsRequest) ProtoReflect ¶
func (x *GetDetailsRequest) ProtoReflect() protoreflect.Message
func (*GetDetailsRequest) Reset ¶
func (x *GetDetailsRequest) Reset()
func (*GetDetailsRequest) String ¶
func (x *GetDetailsRequest) String() string
type GetDetailsResponse ¶
type GetDetailsResponse struct { ServerId string `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty"` DiscoveryPort int32 `protobuf:"varint,2,opt,name=discoveryPort,proto3" json:"discoveryPort,omitempty"` // contains filtered or unexported fields }
func (*GetDetailsResponse) Descriptor
deprecated
func (*GetDetailsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetDetailsResponse.ProtoReflect.Descriptor instead.
func (*GetDetailsResponse) GetDiscoveryPort ¶
func (x *GetDetailsResponse) GetDiscoveryPort() int32
func (*GetDetailsResponse) GetServerId ¶
func (x *GetDetailsResponse) GetServerId() string
func (*GetDetailsResponse) ProtoMessage ¶
func (*GetDetailsResponse) ProtoMessage()
func (*GetDetailsResponse) ProtoReflect ¶
func (x *GetDetailsResponse) ProtoReflect() protoreflect.Message
func (*GetDetailsResponse) Reset ¶
func (x *GetDetailsResponse) Reset()
func (*GetDetailsResponse) String ¶
func (x *GetDetailsResponse) String() string
type RaftClient ¶
type RaftClient interface { ApplyLog(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) GetDetails(ctx context.Context, in *GetDetailsRequest, opts ...grpc.CallOption) (*GetDetailsResponse, error) }
RaftClient is the client API for Raft service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRaftClient ¶
func NewRaftClient(cc grpc.ClientConnInterface) RaftClient
type RaftServer ¶
type RaftServer interface { ApplyLog(context.Context, *ApplyRequest) (*ApplyResponse, error) GetDetails(context.Context, *GetDetailsRequest) (*GetDetailsResponse, error) }
RaftServer is the server API for Raft service.
type UnimplementedRaftServer ¶
type UnimplementedRaftServer struct { }
UnimplementedRaftServer can be embedded to have forward compatible implementations.
func (*UnimplementedRaftServer) ApplyLog ¶
func (*UnimplementedRaftServer) ApplyLog(context.Context, *ApplyRequest) (*ApplyResponse, error)
func (*UnimplementedRaftServer) GetDetails ¶
func (*UnimplementedRaftServer) GetDetails(context.Context, *GetDetailsRequest) (*GetDetailsResponse, error)
Click to show internal directories.
Click to hide internal directories.