Documentation ¶
Index ¶
- type RaftGRPCClient
- func (c *RaftGRPCClient) AppendData(ctx context.Context, in *konsen.AppendDataReq) (*konsen.AppendDataResp, error)
- func (c *RaftGRPCClient) AppendEntries(ctx context.Context, in *konsen.AppendEntriesReq) (*konsen.AppendEntriesResp, error)
- func (c *RaftGRPCClient) Close() error
- func (c *RaftGRPCClient) RequestVote(ctx context.Context, in *konsen.RequestVoteReq) (*konsen.RequestVoteResp, error)
- type RaftGRPCClientConfig
- type RaftGRPCServer
- func (r *RaftGRPCServer) AppendData(ctx context.Context, req *konsen.AppendDataReq) (*konsen.AppendDataResp, error)
- func (r *RaftGRPCServer) AppendEntries(ctx context.Context, req *konsen.AppendEntriesReq) (*konsen.AppendEntriesResp, error)
- func (r *RaftGRPCServer) RequestVote(ctx context.Context, req *konsen.RequestVoteReq) (*konsen.RequestVoteResp, error)
- func (r *RaftGRPCServer) Serve() error
- func (r *RaftGRPCServer) Stop()
- type RaftGRPCServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RaftGRPCClient ¶
type RaftGRPCClient struct {
// contains filtered or unexported fields
}
func NewRaftGRPCClient ¶
func NewRaftGRPCClient(config RaftGRPCClientConfig) (*RaftGRPCClient, error)
func (*RaftGRPCClient) AppendData ¶
func (c *RaftGRPCClient) AppendData(ctx context.Context, in *konsen.AppendDataReq) (*konsen.AppendDataResp, error)
func (*RaftGRPCClient) AppendEntries ¶
func (c *RaftGRPCClient) AppendEntries(ctx context.Context, in *konsen.AppendEntriesReq) (*konsen.AppendEntriesResp, error)
func (*RaftGRPCClient) Close ¶
func (c *RaftGRPCClient) Close() error
func (*RaftGRPCClient) RequestVote ¶
func (c *RaftGRPCClient) RequestVote(ctx context.Context, in *konsen.RequestVoteReq) (*konsen.RequestVoteResp, error)
type RaftGRPCClientConfig ¶
type RaftGRPCServer ¶
type RaftGRPCServer struct { konsen.RaftServer // contains filtered or unexported fields }
func NewRaftGRPCServer ¶
func NewRaftGRPCServer(config RaftGRPCServerConfig) *RaftGRPCServer
func (*RaftGRPCServer) AppendData ¶
func (r *RaftGRPCServer) AppendData(ctx context.Context, req *konsen.AppendDataReq) (*konsen.AppendDataResp, error)
func (*RaftGRPCServer) AppendEntries ¶
func (r *RaftGRPCServer) AppendEntries(ctx context.Context, req *konsen.AppendEntriesReq) (*konsen.AppendEntriesResp, error)
func (*RaftGRPCServer) RequestVote ¶
func (r *RaftGRPCServer) RequestVote(ctx context.Context, req *konsen.RequestVoteReq) (*konsen.RequestVoteResp, error)
func (*RaftGRPCServer) Serve ¶
func (r *RaftGRPCServer) Serve() error
func (*RaftGRPCServer) Stop ¶
func (r *RaftGRPCServer) Stop()
type RaftGRPCServerConfig ¶
type RaftGRPCServerConfig struct { Endpoint string StateMachine *core.StateMachine }
Click to show internal directories.
Click to hide internal directories.