Documentation ¶
Index ¶
- func DoJoinRequest(nodeAddr, raftAddr string) (*http.Response, error)
- func Remove(n *Node, addr string) error
- type Cluster
- type Node
- func (n *Node) ConfirmRedirect(host string) bool
- func (n *Node) Deprovision()
- func (n *Node) Execute(stmt string) (string, error)
- func (n *Node) ExecuteMulti(stmts []string) (string, error)
- func (n *Node) Join(leader *Node) error
- func (n *Node) Query(stmt string) (string, error)
- func (n *Node) SameAs(o *Node) bool
- func (n *Node) WaitForLeader() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoJoinRequest ¶
DoJoinRequest sends a join request to nodeAddr, for raftAddr.
Types ¶
type Cluster ¶
type Cluster []*Node
Cluster represents a cluster of nodes.
func (Cluster) Deprovision ¶
func (c Cluster) Deprovision()
Deprovision deprovisions every node in the cluster.
func (Cluster) FindNodeByRaftAddr ¶
FindNodeByRaftAddr returns the node with the given Raft address.
func (Cluster) RemoveNode ¶
RemoveNode removes the given node from the list of nodes representing a cluster.
type Node ¶
type Node struct { APIAddr string RaftAddr string Dir string Store *store.Store Service *httpd.Service }
Node represents a node under test.
func (*Node) ConfirmRedirect ¶
ConfirmRedirect confirms that the node responds with a redirect to the given host.
func (*Node) Deprovision ¶
func (n *Node) Deprovision()
Deprovision shuts down and removes all resources associated with the node.
func (*Node) ExecuteMulti ¶
ExecuteMulti executes multiple statements against the node.
func (*Node) WaitForLeader ¶
WaitForLeader blocks for up to 10 seconds until the node detects a leader.
Click to show internal directories.
Click to hide internal directories.