backup

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateConfig

func ValidateConfig(cfg Config) error

ValidateConfig validates the base backup configuration

Types

type Config

type Config struct {
	ToBlock   *uint64 // the right bound for the block range; latest if not specified
	FromBlock uint64  // the left bound for the block range

	Watch bool // flag indicating if incoming tx data should be backed up
}

Config is the base chain backup configuration

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default backup configuration

type Option

type Option func(s *Service)

func WithLogger

func WithLogger(l log.Logger) Option

WithLogger specifies the logger for the backup service

type Service

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

Service is the chain backup service

func NewService

func NewService(client client.Client, writer writer.Writer, opts ...Option) *Service

NewService creates a new backup service

func (*Service) ExecuteBackup

func (s *Service) ExecuteBackup(ctx context.Context, cfg Config) error

ExecuteBackup executes the node backup process

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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