recovery

package
v0.0.0-...-daaf58e Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CURRENT_PROPOSAL_FILENAME = "currentproposalid.csv"
View Source
const LOG_FILENAME string = "log.csv"
View Source
const MIN_PROPOSAL_FILENAME string = "minproposalid.csv"
View Source
const PEERS_FILENAME string = "peers.csv"
View Source
const RECOVERY_DIR string = "coldstorage"
View Source
const RECOVERY_DIR_PATTERN string = RECOVERY_DIR + "/%d"
View Source
const RECOVERY_FILE_PATTERN string = RECOVERY_DIR_PATTERN + "/%s"

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func ConstructManager

func ConstructManager() (*Manager, error)

Creates disk access manager for backup & recovery files

func (*Manager) RecoverCurrentProposalId

func (this *Manager) RecoverCurrentProposalId(roleId uint64) (proposal.Id, error)

func (*Manager) RecoverLog

func (this *Manager) RecoverLog(roleId uint64) ([]string, []proposal.Id, error)

Recovers replicated log from disk.

func (*Manager) RecoverMinProposalId

func (this *Manager) RecoverMinProposalId(roleId uint64) (proposal.Id, error)

Recovers the MinProposalId from disk.

func (*Manager) RetrieveAddresses

func (this *Manager) RetrieveAddresses() (map[uint64]string, error)

Reads the list of peers from a file on disk

func (*Manager) UpdateCurrentProposalId

func (this *Manager) UpdateCurrentProposalId(roleId uint64, id proposal.Id) error

func (*Manager) UpdateLogRecord

func (this *Manager) UpdateLogRecord(roleId uint64, index int, value string, id proposal.Id) error

Updates a record in the replicated log on disk.

func (*Manager) UpdateMinProposalId

func (this *Manager) UpdateMinProposalId(roleId uint64, id proposal.Id) error

Jump to

Keyboard shortcuts

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