Documentation ¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) IsLeader() bool
- func (c *Client) Leader() string
- func (c *Client) MustLeader() bool
- func (c *Client) Read(ctx context.Context, in []byte, stream streams.WriteStream) error
- func (c *Client) Write(ctx context.Context, in []byte, stream streams.WriteStream) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a service Client implementation for the Raft consensus protocol
func NewClient ¶
func NewClient(config cluster.Cluster, consistency raft.ReadConsistency) *Client
NewClient returns a new Raft client
func (*Client) MustLeader ¶
MustLeader returns whether requests must be handled by a leader
Click to show internal directories.
Click to hide internal directories.