Versions in this module Expand all Collapse all v0 v0.47.5 Sep 22, 2023 Changes in this version + const CurrentFormat + var ErrChunkHashMismatch = errors.New("chunk hash verification failed") + var ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidMetadata = errors.New("invalid snapshot metadata") + var ErrInvalidSnapshotVersion = errors.New("invalid snapshot version") + var ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") + var ErrUnknownFormat = errors.New("unknown snapshot format") + func WriteExtensionPayload(protoWriter protoio.Writer, payload []byte) error + type ExtensionPayloadReader = func() ([]byte, error) + type ExtensionPayloadWriter = func([]byte) error + type ExtensionSnapshotter interface + RestoreExtension func(height uint64, format uint32, payloadReader ExtensionPayloadReader) error + SnapshotExtension func(height uint64, payloadWriter ExtensionPayloadWriter) error + SnapshotFormat func() uint32 + SnapshotName func() string + SupportedFormats func() []uint32 + type Metadata struct + ChunkHashes [][]byte + func (*Metadata) Descriptor() ([]byte, []int) + func (*Metadata) ProtoMessage() + func (m *Metadata) GetChunkHashes() [][]byte + func (m *Metadata) Marshal() (dAtA []byte, err error) + func (m *Metadata) MarshalTo(dAtA []byte) (int, error) + func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Metadata) Reset() + func (m *Metadata) Size() (n int) + func (m *Metadata) String() string + func (m *Metadata) Unmarshal(dAtA []byte) error + func (m *Metadata) XXX_DiscardUnknown() + func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Metadata) XXX_Merge(src proto.Message) + func (m *Metadata) XXX_Size() int + func (m *Metadata) XXX_Unmarshal(b []byte) error + type Snapshot struct + Chunks uint32 + Format uint32 + Hash []byte + Height uint64 + Metadata Metadata + func SnapshotFromABCI(in *abci.Snapshot) (Snapshot, error) + func (*Snapshot) Descriptor() ([]byte, []int) + func (*Snapshot) ProtoMessage() + func (m *Snapshot) GetChunks() uint32 + func (m *Snapshot) GetFormat() uint32 + func (m *Snapshot) GetHash() []byte + func (m *Snapshot) GetHeight() uint64 + func (m *Snapshot) GetMetadata() Metadata + func (m *Snapshot) Marshal() (dAtA []byte, err error) + func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) + func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Snapshot) Reset() + func (m *Snapshot) Size() (n int) + func (m *Snapshot) String() string + func (m *Snapshot) Unmarshal(dAtA []byte) error + func (m *Snapshot) XXX_DiscardUnknown() + func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Snapshot) XXX_Merge(src proto.Message) + func (m *Snapshot) XXX_Size() int + func (m *Snapshot) XXX_Unmarshal(b []byte) error + func (s Snapshot) ToABCI() (abci.Snapshot, error) + type SnapshotExtensionMeta struct + Format uint32 + Name string + func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) + func (*SnapshotExtensionMeta) ProtoMessage() + func (m *SnapshotExtensionMeta) GetFormat() uint32 + func (m *SnapshotExtensionMeta) GetName() string + func (m *SnapshotExtensionMeta) Marshal() (dAtA []byte, err error) + func (m *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotExtensionMeta) Reset() + func (m *SnapshotExtensionMeta) Size() (n int) + func (m *SnapshotExtensionMeta) String() string + func (m *SnapshotExtensionMeta) Unmarshal(dAtA []byte) error + func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() + func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotExtensionMeta) XXX_Merge(src proto.Message) + func (m *SnapshotExtensionMeta) XXX_Size() int + func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error + type SnapshotExtensionPayload struct + Payload []byte + func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) + func (*SnapshotExtensionPayload) ProtoMessage() + func (m *SnapshotExtensionPayload) GetPayload() []byte + func (m *SnapshotExtensionPayload) Marshal() (dAtA []byte, err error) + func (m *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotExtensionPayload) Reset() + func (m *SnapshotExtensionPayload) Size() (n int) + func (m *SnapshotExtensionPayload) String() string + func (m *SnapshotExtensionPayload) Unmarshal(dAtA []byte) error + func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() + func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotExtensionPayload) XXX_Merge(src proto.Message) + func (m *SnapshotExtensionPayload) XXX_Size() int + func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error + type SnapshotIAVLItem struct + Height int32 + Key []byte + Value []byte + Version int64 + func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) + func (*SnapshotIAVLItem) ProtoMessage() + func (m *SnapshotIAVLItem) GetHeight() int32 + func (m *SnapshotIAVLItem) GetKey() []byte + func (m *SnapshotIAVLItem) GetValue() []byte + func (m *SnapshotIAVLItem) GetVersion() int64 + func (m *SnapshotIAVLItem) Marshal() (dAtA []byte, err error) + func (m *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotIAVLItem) Reset() + func (m *SnapshotIAVLItem) Size() (n int) + func (m *SnapshotIAVLItem) String() string + func (m *SnapshotIAVLItem) Unmarshal(dAtA []byte) error + func (m *SnapshotIAVLItem) XXX_DiscardUnknown() + func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotIAVLItem) XXX_Merge(src proto.Message) + func (m *SnapshotIAVLItem) XXX_Size() int + func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error + type SnapshotItem struct + Item isSnapshotItem_Item + func (*SnapshotItem) Descriptor() ([]byte, []int) + func (*SnapshotItem) ProtoMessage() + func (*SnapshotItem) XXX_OneofWrappers() []interface{} + func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta + func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload + func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem + func (m *SnapshotItem) GetItem() isSnapshotItem_Item + func (m *SnapshotItem) GetKV() *SnapshotKVItem + func (m *SnapshotItem) GetSchema() *SnapshotSchema + func (m *SnapshotItem) GetStore() *SnapshotStoreItem + func (m *SnapshotItem) Marshal() (dAtA []byte, err error) + func (m *SnapshotItem) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotItem) Reset() + func (m *SnapshotItem) Size() (n int) + func (m *SnapshotItem) String() string + func (m *SnapshotItem) Unmarshal(dAtA []byte) error + func (m *SnapshotItem) XXX_DiscardUnknown() + func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotItem) XXX_Merge(src proto.Message) + func (m *SnapshotItem) XXX_Size() int + func (m *SnapshotItem) XXX_Unmarshal(b []byte) error + type SnapshotItem_Extension struct + Extension *SnapshotExtensionMeta + func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotItem_Extension) Size() (n int) + type SnapshotItem_ExtensionPayload struct + ExtensionPayload *SnapshotExtensionPayload + func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotItem_ExtensionPayload) Size() (n int) + type SnapshotItem_IAVL struct + IAVL *SnapshotIAVLItem + func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotItem_IAVL) Size() (n int) + type SnapshotItem_KV struct + KV *SnapshotKVItem + func (m *SnapshotItem_KV) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotItem_KV) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotItem_KV) Size() (n int) + type SnapshotItem_Schema struct + Schema *SnapshotSchema + func (m *SnapshotItem_Schema) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotItem_Schema) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotItem_Schema) Size() (n int) + type SnapshotItem_Store struct + Store *SnapshotStoreItem + func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotItem_Store) Size() (n int) + type SnapshotKVItem struct + Key []byte + Value []byte + func (*SnapshotKVItem) Descriptor() ([]byte, []int) + func (*SnapshotKVItem) ProtoMessage() + func (m *SnapshotKVItem) GetKey() []byte + func (m *SnapshotKVItem) GetValue() []byte + func (m *SnapshotKVItem) Marshal() (dAtA []byte, err error) + func (m *SnapshotKVItem) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotKVItem) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotKVItem) Reset() + func (m *SnapshotKVItem) Size() (n int) + func (m *SnapshotKVItem) String() string + func (m *SnapshotKVItem) Unmarshal(dAtA []byte) error + func (m *SnapshotKVItem) XXX_DiscardUnknown() + func (m *SnapshotKVItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotKVItem) XXX_Merge(src proto.Message) + func (m *SnapshotKVItem) XXX_Size() int + func (m *SnapshotKVItem) XXX_Unmarshal(b []byte) error + type SnapshotOptions struct + Interval uint64 + KeepRecent uint32 + func NewSnapshotOptions(interval uint64, keepRecent uint32) SnapshotOptions + type SnapshotSchema struct + Keys [][]byte + func (*SnapshotSchema) Descriptor() ([]byte, []int) + func (*SnapshotSchema) ProtoMessage() + func (m *SnapshotSchema) GetKeys() [][]byte + func (m *SnapshotSchema) Marshal() (dAtA []byte, err error) + func (m *SnapshotSchema) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotSchema) Reset() + func (m *SnapshotSchema) Size() (n int) + func (m *SnapshotSchema) String() string + func (m *SnapshotSchema) Unmarshal(dAtA []byte) error + func (m *SnapshotSchema) XXX_DiscardUnknown() + func (m *SnapshotSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotSchema) XXX_Merge(src proto.Message) + func (m *SnapshotSchema) XXX_Size() int + func (m *SnapshotSchema) XXX_Unmarshal(b []byte) error + type SnapshotStoreItem struct + Name string + func (*SnapshotStoreItem) Descriptor() ([]byte, []int) + func (*SnapshotStoreItem) ProtoMessage() + func (m *SnapshotStoreItem) GetName() string + func (m *SnapshotStoreItem) Marshal() (dAtA []byte, err error) + func (m *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) + func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *SnapshotStoreItem) Reset() + func (m *SnapshotStoreItem) Size() (n int) + func (m *SnapshotStoreItem) String() string + func (m *SnapshotStoreItem) Unmarshal(dAtA []byte) error + func (m *SnapshotStoreItem) XXX_DiscardUnknown() + func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotStoreItem) XXX_Merge(src proto.Message) + func (m *SnapshotStoreItem) XXX_Size() int + func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error + type Snapshotter interface + PruneSnapshotHeight func(height int64) + Restore func(height uint64, format uint32, protoReader protoio.Reader) (SnapshotItem, error) + SetSnapshotInterval func(snapshotInterval uint64) + Snapshot func(height uint64, protoWriter protoio.Writer) error