Documentation ¶
Overview ¶
Package node implements a raft node that can communicate with other nodes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a database node.
m := node.New(log) err := m.ListenAndServe(ctx, ":34213")
func (*Node) ListenAndServe ¶
ListenAndServe starts the node on the given address. The given context must be used to stop the server, since there is no stop function. Canceling the context or a context timeout will cause the server to attempt a graceful shutdown.
Click to show internal directories.
Click to hide internal directories.