behavior

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RaftConsensusDir     string = "raft-data-dir"
	OverLordConsensusDir string = "overlord_wal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Behavior

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

func (Behavior) Backup

func (receiver Behavior) Backup(sourcePath string, destPath string, options *common.CompressOptions) (*Result, error)

func (Behavior) ChangeOwner added in v0.0.2

func (receiver Behavior) ChangeOwner(uid, gid int64, path string) error

func (Behavior) Fallback

func (receiver Behavior) Fallback(blockHeight int64, nodeRoot string, configPath string, crypto string, consensus string, deleteConsensusData bool) error

func (Behavior) Restore

func (receiver Behavior) Restore(sourcePath string, destPath string, options *common.DecompressOptions, deleteConsensusData bool) error

func (Behavior) Snapshot added in v0.0.2

func (receiver Behavior) Snapshot(blockHeight int64, nodeRoot string, configPath string, backupPath string, crypto string, consensus string) (int64, error)

func (Behavior) SnapshotRecover added in v0.0.2

func (receiver Behavior) SnapshotRecover(blockHeight int64, nodeRoot string, configPath string, backupPath string, crypto string, consensus string, deleteConsensusData bool) error

type Interface

type Interface interface {
	Backup(sourcePath string, destPath string, options *common.CompressOptions) (*Result, error)
	Restore(sourcePath string, destPath string, options *common.DecompressOptions, deleteConsensusData bool) error
	Fallback(blockHeight int64, nodeRoot string, configPath string, crypto string, consensus string, deleteConsensusData bool) error
	Snapshot(blockHeight int64, nodeRoot string, configPath string, backupPath string, crypto string, consensus string) (int64, error)
	SnapshotRecover(blockHeight int64, nodeRoot string, configPath string, backupPath string, crypto string, consensus string, deleteConsensusData bool) error
	ChangeOwner(uid, gid int64, path string) error
}

func NewBehavior

func NewBehavior(execer exec.Interface, logger logr.Logger) Interface

type Result added in v0.0.5

type Result struct {
	Size int64
	Md5  string
}

Jump to

Keyboard shortcuts

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