Versions in this module Expand all Collapse all v0 v0.47.0 Aug 13, 2022 Changes in this version + var ErrOptsZeroSnapshotInterval = errors.New("snaphot-interval must not be 0") + func DrainChunks(chunks <-chan io.ReadCloser) + func IsFormatSupported(snapshotter types.ExtensionSnapshotter, format uint32) bool + func ValidRestoreHeight(format uint32, height uint64) error + type ChunkReader struct + func NewChunkReader(ch <-chan io.ReadCloser) *ChunkReader + func (r *ChunkReader) Close() error + func (r *ChunkReader) Read(p []byte) (int, error) + type ChunkWriter struct + func NewChunkWriter(ch chan<- io.ReadCloser, chunkSize uint64) *ChunkWriter + func (w *ChunkWriter) Close() error + func (w *ChunkWriter) CloseWithError(err error) + func (w *ChunkWriter) Write(data []byte) (int, error) + type Manager struct + func NewManager(store *Store, opts types.SnapshotOptions, multistore types.Snapshotter, ...) *Manager + func (m *Manager) Create(height uint64) (*types.Snapshot, error) + func (m *Manager) GetInterval() uint64 + func (m *Manager) GetKeepRecent() uint32 + func (m *Manager) GetSnapshotBlockRetentionHeights() int64 + func (m *Manager) List() ([]*types.Snapshot, error) + func (m *Manager) LoadChunk(height uint64, format uint32, chunk uint32) ([]byte, error) + func (m *Manager) Prune(retain uint32) (uint64, error) + func (m *Manager) RegisterExtensions(extensions ...types.ExtensionSnapshotter) error + func (m *Manager) Restore(snapshot types.Snapshot) error + func (m *Manager) RestoreChunk(chunk []byte) (bool, error) + func (m *Manager) SnapshotIfApplicable(height int64) + type Store struct + func NewStore(db db.DB, dir string) (*Store, error) + func (s *Store) Delete(height uint64, format uint32) error + func (s *Store) Get(height uint64, format uint32) (*types.Snapshot, error) + func (s *Store) GetLatest() (*types.Snapshot, error) + func (s *Store) List() ([]*types.Snapshot, error) + func (s *Store) Load(height uint64, format uint32) (*types.Snapshot, <-chan io.ReadCloser, error) + func (s *Store) LoadChunk(height uint64, format uint32, chunk uint32) (io.ReadCloser, error) + func (s *Store) Prune(retain uint32) (uint64, error) + func (s *Store) Save(height uint64, format uint32, chunks <-chan io.ReadCloser) (*types.Snapshot, error) + type StreamReader struct + func NewStreamReader(chunks <-chan io.ReadCloser) (*StreamReader, error) + func (sr *StreamReader) Close() error + func (sr *StreamReader) ReadMsg(msg proto.Message) error + type StreamWriter struct + func NewStreamWriter(ch chan<- io.ReadCloser) *StreamWriter + func (sw *StreamWriter) Close() error + func (sw *StreamWriter) CloseWithError(err error) + func (sw *StreamWriter) WriteMsg(msg proto.Message) error