bindings

package
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNodeStopped = fmt.Errorf("server was stopped")

ErrNodeStopped is returned by Node.Handle() is the server was stopped.

Functions

func ConfigMultiThread added in v1.2.0

func ConfigMultiThread() error

func ConfigSingleThread added in v1.2.0

func ConfigSingleThread() error

func GenerateID added in v1.4.0

func GenerateID(address string) uint64

GenerateID generates a unique ID for a server.

Types

type Node added in v1.0.0

type Node struct {
	// contains filtered or unexported fields
}

func NewNode added in v1.0.0

func NewNode(ctx context.Context, id uint64, address string, dir string) (*Node, error)

NewNode creates a new Node instance.

func (*Node) Close added in v1.0.0

func (s *Node) Close()

Close the server releasing all used resources.

func (*Node) EnableDiskMode added in v1.11.6

func (s *Node) EnableDiskMode() error

func (*Node) GetBindAddress added in v1.0.0

func (s *Node) GetBindAddress() string

func (*Node) Recover added in v1.1.0

func (s *Node) Recover(cluster []protocol.NodeInfo) error

Remark that Recover doesn't take the node role into account

func (*Node) RecoverExt added in v1.9.0

func (s *Node) RecoverExt(cluster []protocol.NodeInfo) error

RecoverExt has a similar purpose as `Recover` but takes the node role into account

func (*Node) SetAutoRecovery added in v1.21.0

func (s *Node) SetAutoRecovery(on bool) error

func (*Node) SetBindAddress added in v1.0.0

func (s *Node) SetBindAddress(address string) error

func (*Node) SetDialFunc added in v1.0.0

func (s *Node) SetDialFunc(dial protocol.DialFunc) error

func (*Node) SetFailureDomain added in v1.7.0

func (s *Node) SetFailureDomain(code uint64) error

func (*Node) SetNetworkLatency added in v1.0.0

func (s *Node) SetNetworkLatency(nanoseconds uint64) error

func (*Node) SetSnapshotParams added in v1.9.0

func (s *Node) SetSnapshotParams(params SnapshotParams) error

func (*Node) Start added in v1.0.0

func (s *Node) Start() error

func (*Node) Stop added in v1.0.0

func (s *Node) Stop() error

type SnapshotParams added in v1.9.0

type SnapshotParams struct {
	Threshold uint64
	Trailing  uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL