Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigMultiThread() error
- func ConfigSingleThread() error
- func GenerateID(address string) uint64
- type Node
- func (s *Node) Close()
- func (s *Node) DescribeLastEntry() (uint64, uint64, error)
- func (s *Node) EnableDiskMode() error
- func (s *Node) GetBindAddress() string
- func (s *Node) Recover(cluster []protocol.NodeInfo) error
- func (s *Node) RecoverExt(cluster []protocol.NodeInfo) error
- func (s *Node) SetAutoRecovery(on bool) error
- func (s *Node) SetBindAddress(address string) error
- func (s *Node) SetBlockSize(size uint) error
- func (s *Node) SetBusyTimeout(milliseconds uint64) error
- func (s *Node) SetDialFunc(dial protocol.DialFunc) error
- func (s *Node) SetFailureDomain(code uint64) error
- func (s *Node) SetNetworkLatency(nanoseconds uint64) error
- func (s *Node) SetSnapshotParams(params SnapshotParams) error
- func (s *Node) Start() error
- func (s *Node) Stop() error
- type SnapshotParams
- type TrailingStrategy
Constants ¶
View Source
const DqliteMinSupportedVersion = 1_17_00
required dqlite version
Variables ¶
View Source
var DqliteVersion = int(C.dqlite_version_number())
View Source
var ErrNodeStopped = fmt.Errorf("server was stopped")
ErrNodeStopped is returned by Node.Handle() is the server was stopped.
Functions ¶
func ConfigMultiThread ¶
func ConfigMultiThread() error
func ConfigSingleThread ¶
func ConfigSingleThread() error
func GenerateID ¶
GenerateID generates a unique ID for a server.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) EnableDiskMode ¶
func (*Node) GetBindAddress ¶
func (*Node) RecoverExt ¶
RecoverExt has a similar purpose as `Recover` but takes the node role into account
func (*Node) SetAutoRecovery ¶
func (*Node) SetBindAddress ¶
func (*Node) SetBlockSize ¶ added in v3.0.3
func (*Node) SetBusyTimeout ¶ added in v3.0.2
func (*Node) SetFailureDomain ¶
func (*Node) SetNetworkLatency ¶
func (*Node) SetSnapshotParams ¶
func (s *Node) SetSnapshotParams(params SnapshotParams) error
type SnapshotParams ¶
type SnapshotParams struct {
Threshold uint64
Trailing uint64
Strategy TrailingStrategy
}
type TrailingStrategy ¶ added in v3.0.1
type TrailingStrategy int
const ( TrailingStrategyStatic TrailingStrategy = C.DQLITE_SNAPSHOT_TRAILING_STATIC TrailingStrategyDynamic TrailingStrategy = C.DQLITE_SNAPSHOT_TRAILING_DYNAMIC )
Click to show internal directories.
Click to hide internal directories.