Documentation
¶
Index ¶
- Constants
- Variables
- func CopyFile(fs afero.Fs, src, dst string) error
- func Generate(ctx context.Context, fs afero.Fs, db *sql.Database, dataDir string, ...) error
- func RecoveryDir(dataDir string) string
- func RecoveryFilename(dataDir, base string, restore types.LayerID) string
- func SelfCheckpointFilename(dataDir string, snapshot types.LayerID) string
- func ValidateSchema(data []byte) error
- type Config
- type PreservedData
- type RecoverConfig
- type RecoveryFile
Constants ¶
View Source
const ( SchemaVersion = "https://spacemesh.io/checkpoint.schema.json.1.0" CommandString = "grpcurl -plaintext -d '%s' 0.0.0.0:9093 spacemesh.v1.AdminService.CheckpointStream" )
Variables ¶
View Source
var ( ErrCheckpointNotFound = errors.New("checkpoint not found") ErrUrlSchemeNotSupported = errors.New("url scheme not supported") )
View Source
var Schema string
Functions ¶
func RecoveryDir ¶
func SelfCheckpointFilename ¶
func ValidateSchema ¶
Types ¶
type Config ¶
type Config struct {
Uri string `mapstructure:"recovery-uri"`
Restore uint32 `mapstructure:"recovery-layer"`
// set to false if atxs are not compatible before and after the checkpoint recovery.
PreserveOwnAtx bool `mapstructure:"preserve-own-atx"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type PreservedData ¶
type PreservedData struct {
Deps []*types.VerifiedActivationTx
Proofs []*types.PoetProofMessage
}
func Recover ¶
func Recover( ctx context.Context, logger log.Log, fs afero.Fs, cfg *RecoverConfig, ) (*PreservedData, error)
func RecoverWithDb ¶
type RecoverConfig ¶
type RecoveryFile ¶
type RecoveryFile struct {
// contains filtered or unexported fields
}
func NewRecoveryFile ¶
func NewRecoveryFile(fs afero.Fs, path string) (*RecoveryFile, error)
Click to show internal directories.
Click to hide internal directories.