Documentation ¶
Index ¶
- Variables
- func NewGrpcClient(addr, lAddr string) (*grpc.ClientConn, error)
- type RaftGrpcClient
- func (grpcClient *RaftGrpcClient) Close()
- func (grpcClient *RaftGrpcClient) SendAppendEntriesRequest(request *raft.AppendEntriesRequest) (*raft.AppendEntriesResponse, error)
- func (grpcClient *RaftGrpcClient) SendClusterJoinRequest(request *raft.ClusterJoinRequest) (*raft.ClusterJoinResponse, error)
- func (grpcClient *RaftGrpcClient) SendClusterLeaveRequest(request *raft.ClusterLeaveRequest) (*raft.ClusterLeaveResponse, error)
- func (grpcClient *RaftGrpcClient) SendClusterStatusRequest(request *raft.ClusterStatusRequest) (*raft.ClusterStatusResponse, error)
- func (grpcClient *RaftGrpcClient) SendNewVoteRequest(request *raft.NewVoteRequest) (*raft.NewVoteResponse, error)
- func (grpcClient *RaftGrpcClient) SendSnapshotRecoveryRequest(request *raft.SnapshotRecoveryRequest) (*raft.SnapshotRecoveryResponse, error)
- func (grpcClient *RaftGrpcClient) SendSnapshotRequest(request *raft.SnapshotRequest) (*raft.SnapshotResponse, error)
- func (grpcClient *RaftGrpcClient) SendVoteRequest(request *raft.RequestVoteRequest) (*raft.RequestVoteResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var KeepaliveTime = 10 * time.Second
View Source
var PermitWithoutStream = true
Functions ¶
func NewGrpcClient ¶
func NewGrpcClient(addr, lAddr string) (*grpc.ClientConn, error)
Types ¶
type RaftGrpcClient ¶
type RaftGrpcClient struct { Client raft.RaftServerClient Conn *grpc.ClientConn Addr string RequestTimeout time.Duration }
func NewRaftGrpcClient ¶
func NewRaftGrpcClient(addr, lAddr string, timeout time.Duration) (*RaftGrpcClient, error)
func (*RaftGrpcClient) Close ¶
func (grpcClient *RaftGrpcClient) Close()
func (*RaftGrpcClient) SendAppendEntriesRequest ¶
func (grpcClient *RaftGrpcClient) SendAppendEntriesRequest(request *raft.AppendEntriesRequest) (*raft.AppendEntriesResponse, error)
func (*RaftGrpcClient) SendClusterJoinRequest ¶
func (grpcClient *RaftGrpcClient) SendClusterJoinRequest(request *raft.ClusterJoinRequest) (*raft.ClusterJoinResponse, error)
func (*RaftGrpcClient) SendClusterLeaveRequest ¶
func (grpcClient *RaftGrpcClient) SendClusterLeaveRequest(request *raft.ClusterLeaveRequest) (*raft.ClusterLeaveResponse, error)
func (*RaftGrpcClient) SendClusterStatusRequest ¶
func (grpcClient *RaftGrpcClient) SendClusterStatusRequest(request *raft.ClusterStatusRequest) (*raft.ClusterStatusResponse, error)
func (*RaftGrpcClient) SendNewVoteRequest ¶
func (grpcClient *RaftGrpcClient) SendNewVoteRequest(request *raft.NewVoteRequest) (*raft.NewVoteResponse, error)
func (*RaftGrpcClient) SendSnapshotRecoveryRequest ¶
func (grpcClient *RaftGrpcClient) SendSnapshotRecoveryRequest(request *raft.SnapshotRecoveryRequest) (*raft.SnapshotRecoveryResponse, error)
func (*RaftGrpcClient) SendSnapshotRequest ¶
func (grpcClient *RaftGrpcClient) SendSnapshotRequest(request *raft.SnapshotRequest) (*raft.SnapshotResponse, error)
func (*RaftGrpcClient) SendVoteRequest ¶
func (grpcClient *RaftGrpcClient) SendVoteRequest(request *raft.RequestVoteRequest) (*raft.RequestVoteResponse, error)
Click to show internal directories.
Click to hide internal directories.