Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationSnapshot ¶
type MigrationSnapshot interface { snapshot.StorageSnapshot Exists(id flow.RegisterID) bool ApplyChangesAndGetNewPayloads( changes map[flow.RegisterID]flow.RegisterValue, expectedChangeAddresses map[flow.Address]struct{}, logger zerolog.Logger, ) ([]*ledger.Payload, error) Len() int PayloadMap() map[flow.RegisterID]*ledger.Payload }
func NewPayloadSnapshot ¶
func NewPayloadSnapshot( log zerolog.Logger, payloads []*ledger.Payload, snapshotType MigrationSnapshotType, nWorkers int, ) (MigrationSnapshot, error)
type MigrationSnapshotError ¶
type MigrationSnapshotError struct {
Err error
}
func NewMigrationSnapshotError ¶
func NewMigrationSnapshotError(err error) *MigrationSnapshotError
func (*MigrationSnapshotError) Error ¶
func (e *MigrationSnapshotError) Error() string
func (*MigrationSnapshotError) Unwrap ¶
func (e *MigrationSnapshotError) Unwrap() error
type MigrationSnapshotType ¶
type MigrationSnapshotType int
const ( // LargeChangeSetOrReadonlySnapshot creates a `map[flow.RegisterID]*ledger.Payload` from the payloads // It is more efficient when the number of payloads that are going to change is either 0 // or large compared to the total number of payloads (more than 30% of the current number of payloads). LargeChangeSetOrReadonlySnapshot MigrationSnapshotType = iota // SmallChangeSetSnapshot creates a map of indexes `map[flow.RegisterID]int` from the payloads array // It is more efficient when the number of payloads that are going to change is small // compared to the total number of payloads (less than 30% of the current number of payloads). SmallChangeSetSnapshot )
Click to show internal directories.
Click to hide internal directories.