Documentation ¶
Index ¶
- Variables
- func GetCurrentStateSnapshots(dir string) (string, map[int64]CurrentState, error)
- func GetHistoryMd5Hash(snapshot MetaData) (string, error)
- func GetSnapshotMd5Hash(currentStateSnapshotFile string, historySnapshotFile string) (string, error)
- func InProgressFileName(chainID string, height int64) string
- type Config
- type Conn
- type CurrentState
- type DatabaseMetadata
- type History
- type HypertablePartitionColumns
- type IndexInfo
- type LoadLog
- type LoadResult
- type MetaData
- type Service
- func (b *Service) CreateSnapshot(ctx context.Context, chainID string, toHeight int64) (MetaData, error)
- func (b *Service) CreateSnapshotAsynchronously(ctx context.Context, chainID string, toHeight int64) (MetaData, error)
- func (b *Service) LoadSnapshotData(ctx context.Context, log LoadLog, currentStateSnapshot CurrentState, ...) (LoadResult, error)
- func (b *Service) SnapshotData(ctx context.Context, chainID string, toHeight int64) error
- type Span
- type TableMetadata
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSnapshotExists = errors.New("Snapshot exists") ErrNoLastSnapshot = errors.New("No last snapshot") )
Functions ¶
func GetCurrentStateSnapshots ¶
func GetCurrentStateSnapshots(dir string) (string, map[int64]CurrentState, error)
func GetHistoryMd5Hash ¶
func GetSnapshotMd5Hash ¶
func InProgressFileName ¶
Types ¶
type Config ¶
type Config struct {
WaitForCreationLockTimeout encoding.Duration `` /* 140-byte string literal not displayed */
}
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.
type CurrentState ¶
func NewCurrentSnapshot ¶
func NewCurrentSnapshot(chainID string, height int64) CurrentState
func (CurrentState) CompressedFileName ¶
func (s CurrentState) CompressedFileName() string
func (CurrentState) GetCopySQL ¶
func (s CurrentState) GetCopySQL(dbMetaData DatabaseMetadata, databaseSnapshotsPath string) []string
func (CurrentState) String ¶
func (s CurrentState) String() string
func (CurrentState) UncompressedDataDir ¶
func (s CurrentState) UncompressedDataDir() string
type DatabaseMetadata ¶
type DatabaseMetadata struct { TableNameToMetaData map[string]TableMetadata DatabaseVersion int64 }
func NewDatabaseMetaData ¶
func (DatabaseMetadata) GetHistoryTableNames ¶
func (d DatabaseMetadata) GetHistoryTableNames() []string
type History ¶
func NewHistorySnapshot ¶
func (History) CompressedFileName ¶
func (History) GetCopySQL ¶
func (h History) GetCopySQL(dbMetaData DatabaseMetadata, databaseSnapshotsPath string) []string
func (History) UncompressedDataDir ¶
type LoadResult ¶
type MetaData ¶
type MetaData struct { CurrentStateSnapshot CurrentState HistorySnapshot History CurrentStateSnapshotPath string HistorySnapshotPath string DatabaseVersion int64 }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewSnapshotService ¶
func (*Service) CreateSnapshot ¶
func (*Service) CreateSnapshotAsynchronously ¶
func (*Service) LoadSnapshotData ¶ added in v0.68.0
func (b *Service) LoadSnapshotData(ctx context.Context, log LoadLog, currentStateSnapshot CurrentState, contiguousHistory []History, sourceDir string, connConfig sqlstore.ConnectionConfig, withIndexesAndOrderTriggers bool, ) (LoadResult, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.