cluster

package
v0.0.0-...-96b211d Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataNode

type DataNode interface {
	Create(data []byte) (string, error)
	Read(sha512Hex string, begins uint32, ends uint32, readHandler func(data []byte) error) error
	Delete(sha512Hex string) error

	HardwareId() (string, error)
	Join(clusterId string, nodeId string, masterAddress string) bool
	Mode(master bool) bool
	Leave() bool
	Wipe() bool

	SyncCreate(sha512Hex string, usage uint16, sourceNodeAddr string) error
	SyncDelete(sha512Hex string, usage uint16) error
	SyncMove(sha512Hex string, sourceNodeAddr string) error
	SyncList(snapshotTime *time.Time) (*common.SyncContainer, error)
	SyncFull(sourceNodeAddr string) bool
	SyncUsage(usageMap map[string]uint16) error

	SnapshotCreate() bool
	SnapshotDelete(snapshotIndex uint64) bool
	SnapshotRestore(snapshotIndex uint64) bool

	Ping() int64
	Size() (uint64, error)
	Used() (uint64, error)

	RequestHandshake() bool
}

func NewDataNode

func NewDataNode(nodeAddress string) (DataNode, error)

Jump to

Keyboard shortcuts

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