Documentation ¶
Overview ¶
Package storage contains ledger storage implementation on top of BadgerDB engine.
Index ¶
- Variables
- func NullifyJetInKey(key []byte)
- type Cleaner
- type CleanerMock
- func (m *CleanerMock) AllMocksCalled() bool
- func (m *CleanerMock) CheckMocksCalled()
- func (m *CleanerMock) CleanJetIndexes(p context.Context, p1 core.RecordID, p2 recentstorage.RecentIndexStorage, ...) (r RmStat, r1 error)
- func (m *CleanerMock) CleanJetIndexesFinished() bool
- func (m *CleanerMock) CleanJetIndexesMinimockCounter() uint64
- func (m *CleanerMock) CleanJetIndexesMinimockPreCounter() uint64
- func (m *CleanerMock) CleanJetRecordsUntilPulse(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r map[string]RmStat, r1 error)
- func (m *CleanerMock) CleanJetRecordsUntilPulseFinished() bool
- func (m *CleanerMock) CleanJetRecordsUntilPulseMinimockCounter() uint64
- func (m *CleanerMock) CleanJetRecordsUntilPulseMinimockPreCounter() uint64
- func (m *CleanerMock) Finish()
- func (m *CleanerMock) MinimockFinish()
- func (m *CleanerMock) MinimockWait(timeout time.Duration)
- func (m *CleanerMock) ValidateCallCounters()
- func (m *CleanerMock) Wait(timeout time.Duration)
- type CleanerMockCleanJetIndexesExpectation
- type CleanerMockCleanJetIndexesInput
- type CleanerMockCleanJetIndexesResult
- type CleanerMockCleanJetRecordsUntilPulseExpectation
- type CleanerMockCleanJetRecordsUntilPulseInput
- type CleanerMockCleanJetRecordsUntilPulseResult
- type DB
- func (db *DB) BeginTransaction(update bool) (*TransactionManager, error)
- func (db *DB) Close() error
- func (db *DB) GetBadgerDB() *badger.DB
- func (db *DB) GetLocalData(ctx context.Context, pulse core.PulseNumber, key []byte) ([]byte, error)
- func (db *DB) GetPlatformCryptographyScheme() core.PlatformCryptographyScheme
- func (db *DB) IterateLocalData(ctx context.Context, pulse core.PulseNumber, prefix []byte, ...) error
- func (db *DB) IterateRecordsOnPulse(ctx context.Context, jetID core.RecordID, pulse core.PulseNumber, ...) error
- func (db *DB) SetLocalData(ctx context.Context, pulse core.PulseNumber, key []byte, data []byte) error
- func (db *DB) SetTxRetiries(n int)
- func (db *DB) Stop(ctx context.Context) error
- func (db *DB) StoreKeyValues(ctx context.Context, kvs []core.KV) error
- func (db *DB) Update(ctx context.Context, fn func(*TransactionManager) error) error
- func (db *DB) View(ctx context.Context, fn func(*TransactionManager) error) error
- type DBContext
- type DBContextMock
- func (m *DBContextMock) AllMocksCalled() bool
- func (m *DBContextMock) BeginTransaction(p bool) (r *TransactionManager, r1 error)
- func (m *DBContextMock) BeginTransactionFinished() bool
- func (m *DBContextMock) BeginTransactionMinimockCounter() uint64
- func (m *DBContextMock) BeginTransactionMinimockPreCounter() uint64
- func (m *DBContextMock) CheckMocksCalled()
- func (m *DBContextMock) Close() (r error)
- func (m *DBContextMock) CloseFinished() bool
- func (m *DBContextMock) CloseMinimockCounter() uint64
- func (m *DBContextMock) CloseMinimockPreCounter() uint64
- func (m *DBContextMock) Finish()
- func (m *DBContextMock) GetBadgerDB() (r *badger.DB)
- func (m *DBContextMock) GetBadgerDBFinished() bool
- func (m *DBContextMock) GetBadgerDBMinimockCounter() uint64
- func (m *DBContextMock) GetBadgerDBMinimockPreCounter() uint64
- func (m *DBContextMock) GetLocalData(p context.Context, p1 core.PulseNumber, p2 []byte) (r []byte, r1 error)
- func (m *DBContextMock) GetLocalDataFinished() bool
- func (m *DBContextMock) GetLocalDataMinimockCounter() uint64
- func (m *DBContextMock) GetLocalDataMinimockPreCounter() uint64
- func (m *DBContextMock) GetPlatformCryptographyScheme() (r core.PlatformCryptographyScheme)
- func (m *DBContextMock) GetPlatformCryptographySchemeFinished() bool
- func (m *DBContextMock) GetPlatformCryptographySchemeMinimockCounter() uint64
- func (m *DBContextMock) GetPlatformCryptographySchemeMinimockPreCounter() uint64
- func (m *DBContextMock) IterateLocalData(p context.Context, p1 core.PulseNumber, p2 []byte, ...) (r error)
- func (m *DBContextMock) IterateLocalDataFinished() bool
- func (m *DBContextMock) IterateLocalDataMinimockCounter() uint64
- func (m *DBContextMock) IterateLocalDataMinimockPreCounter() uint64
- func (m *DBContextMock) IterateRecordsOnPulse(p context.Context, p1 core.RecordID, p2 core.PulseNumber, ...) (r error)
- func (m *DBContextMock) IterateRecordsOnPulseFinished() bool
- func (m *DBContextMock) IterateRecordsOnPulseMinimockCounter() uint64
- func (m *DBContextMock) IterateRecordsOnPulseMinimockPreCounter() uint64
- func (m *DBContextMock) MinimockFinish()
- func (m *DBContextMock) MinimockWait(timeout time.Duration)
- func (m *DBContextMock) SetLocalData(p context.Context, p1 core.PulseNumber, p2 []byte, p3 []byte) (r error)
- func (m *DBContextMock) SetLocalDataFinished() bool
- func (m *DBContextMock) SetLocalDataMinimockCounter() uint64
- func (m *DBContextMock) SetLocalDataMinimockPreCounter() uint64
- func (m *DBContextMock) SetTxRetiries(p int)
- func (m *DBContextMock) SetTxRetiriesFinished() bool
- func (m *DBContextMock) SetTxRetiriesMinimockCounter() uint64
- func (m *DBContextMock) SetTxRetiriesMinimockPreCounter() uint64
- func (m *DBContextMock) StoreKeyValues(p context.Context, p1 []core.KV) (r error)
- func (m *DBContextMock) StoreKeyValuesFinished() bool
- func (m *DBContextMock) StoreKeyValuesMinimockCounter() uint64
- func (m *DBContextMock) StoreKeyValuesMinimockPreCounter() uint64
- func (m *DBContextMock) Update(p context.Context, p1 func(p *TransactionManager) (r error)) (r error)
- func (m *DBContextMock) UpdateFinished() bool
- func (m *DBContextMock) UpdateMinimockCounter() uint64
- func (m *DBContextMock) UpdateMinimockPreCounter() uint64
- func (m *DBContextMock) ValidateCallCounters()
- func (m *DBContextMock) View(p context.Context, p1 func(p *TransactionManager) (r error)) (r error)
- func (m *DBContextMock) ViewFinished() bool
- func (m *DBContextMock) ViewMinimockCounter() uint64
- func (m *DBContextMock) ViewMinimockPreCounter() uint64
- func (m *DBContextMock) Wait(timeout time.Duration)
- type DBContextMockBeginTransactionExpectation
- type DBContextMockBeginTransactionInput
- type DBContextMockBeginTransactionResult
- type DBContextMockCloseExpectation
- type DBContextMockCloseResult
- type DBContextMockGetBadgerDBExpectation
- type DBContextMockGetBadgerDBResult
- type DBContextMockGetLocalDataExpectation
- type DBContextMockGetLocalDataInput
- type DBContextMockGetLocalDataResult
- type DBContextMockGetPlatformCryptographySchemeExpectation
- type DBContextMockGetPlatformCryptographySchemeResult
- type DBContextMockIterateLocalDataExpectation
- type DBContextMockIterateLocalDataInput
- type DBContextMockIterateLocalDataResult
- type DBContextMockIterateRecordsOnPulseExpectation
- type DBContextMockIterateRecordsOnPulseInput
- type DBContextMockIterateRecordsOnPulseResult
- type DBContextMockSetLocalDataExpectation
- type DBContextMockSetLocalDataInput
- type DBContextMockSetLocalDataResult
- type DBContextMockSetTxRetiriesExpectation
- type DBContextMockSetTxRetiriesInput
- type DBContextMockStoreKeyValuesExpectation
- type DBContextMockStoreKeyValuesInput
- type DBContextMockStoreKeyValuesResult
- type DBContextMockUpdateExpectation
- type DBContextMockUpdateInput
- type DBContextMockUpdateResult
- type DBContextMockViewExpectation
- type DBContextMockViewInput
- type DBContextMockViewResult
- type DBContextMockgetExpectation
- type DBContextMockgetInput
- type DBContextMockgetResult
- type DBContextMockiterateExpectation
- type DBContextMockiterateInput
- type DBContextMockiterateResult
- type DBContextMocksetExpectation
- type DBContextMocksetInput
- type DBContextMocksetResult
- type DBContextMockwaitingFlightExpectation
- type DropStorage
- type DropStorageMock
- func (m *DropStorageMock) AddDropSize(p context.Context, p1 *jet.DropSize) (r error)
- func (m *DropStorageMock) AddDropSizeFinished() bool
- func (m *DropStorageMock) AddDropSizeMinimockCounter() uint64
- func (m *DropStorageMock) AddDropSizeMinimockPreCounter() uint64
- func (m *DropStorageMock) AllMocksCalled() bool
- func (m *DropStorageMock) CheckMocksCalled()
- func (m *DropStorageMock) CreateDrop(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 []byte) (r *jet.JetDrop, r1 [][]byte, r2 uint64, r3 error)
- func (m *DropStorageMock) CreateDropFinished() bool
- func (m *DropStorageMock) CreateDropMinimockCounter() uint64
- func (m *DropStorageMock) CreateDropMinimockPreCounter() uint64
- func (m *DropStorageMock) Finish()
- func (m *DropStorageMock) GetDrop(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r *jet.JetDrop, r1 error)
- func (m *DropStorageMock) GetDropFinished() bool
- func (m *DropStorageMock) GetDropMinimockCounter() uint64
- func (m *DropStorageMock) GetDropMinimockPreCounter() uint64
- func (m *DropStorageMock) GetDropSizeHistory(p context.Context, p1 core.RecordID) (r jet.DropSizeHistory, r1 error)
- func (m *DropStorageMock) GetDropSizeHistoryFinished() bool
- func (m *DropStorageMock) GetDropSizeHistoryMinimockCounter() uint64
- func (m *DropStorageMock) GetDropSizeHistoryMinimockPreCounter() uint64
- func (m *DropStorageMock) GetJetSizesHistoryDepth() (r int)
- func (m *DropStorageMock) GetJetSizesHistoryDepthFinished() bool
- func (m *DropStorageMock) GetJetSizesHistoryDepthMinimockCounter() uint64
- func (m *DropStorageMock) GetJetSizesHistoryDepthMinimockPreCounter() uint64
- func (m *DropStorageMock) MinimockFinish()
- func (m *DropStorageMock) MinimockWait(timeout time.Duration)
- func (m *DropStorageMock) SetDrop(p context.Context, p1 core.RecordID, p2 *jet.JetDrop) (r error)
- func (m *DropStorageMock) SetDropFinished() bool
- func (m *DropStorageMock) SetDropMinimockCounter() uint64
- func (m *DropStorageMock) SetDropMinimockPreCounter() uint64
- func (m *DropStorageMock) SetDropSizeHistory(p context.Context, p1 core.RecordID, p2 jet.DropSizeHistory) (r error)
- func (m *DropStorageMock) SetDropSizeHistoryFinished() bool
- func (m *DropStorageMock) SetDropSizeHistoryMinimockCounter() uint64
- func (m *DropStorageMock) SetDropSizeHistoryMinimockPreCounter() uint64
- func (m *DropStorageMock) ValidateCallCounters()
- func (m *DropStorageMock) Wait(timeout time.Duration)
- type DropStorageMockAddDropSizeExpectation
- type DropStorageMockAddDropSizeInput
- type DropStorageMockAddDropSizeResult
- type DropStorageMockCreateDropExpectation
- type DropStorageMockCreateDropInput
- type DropStorageMockCreateDropResult
- type DropStorageMockGetDropExpectation
- type DropStorageMockGetDropInput
- type DropStorageMockGetDropResult
- type DropStorageMockGetDropSizeHistoryExpectation
- type DropStorageMockGetDropSizeHistoryInput
- type DropStorageMockGetDropSizeHistoryResult
- type DropStorageMockGetJetSizesHistoryDepthExpectation
- type DropStorageMockGetJetSizesHistoryDepthResult
- type DropStorageMockSetDropExpectation
- type DropStorageMockSetDropInput
- type DropStorageMockSetDropResult
- type DropStorageMockSetDropSizeHistoryExpectation
- type DropStorageMockSetDropSizeHistoryInput
- type DropStorageMockSetDropSizeHistoryResult
- type GenesisState
- type IDLocker
- type JetStorage
- type JetStorageMock
- func (m *JetStorageMock) AddJets(p context.Context, p1 ...core.RecordID) (r error)
- func (m *JetStorageMock) AddJetsFinished() bool
- func (m *JetStorageMock) AddJetsMinimockCounter() uint64
- func (m *JetStorageMock) AddJetsMinimockPreCounter() uint64
- func (m *JetStorageMock) AllMocksCalled() bool
- func (m *JetStorageMock) CheckMocksCalled()
- func (m *JetStorageMock) CloneJetTree(p context.Context, p1 core.PulseNumber, p2 core.PulseNumber) (r *jet.Tree)
- func (m *JetStorageMock) CloneJetTreeFinished() bool
- func (m *JetStorageMock) CloneJetTreeMinimockCounter() uint64
- func (m *JetStorageMock) CloneJetTreeMinimockPreCounter() uint64
- func (m *JetStorageMock) DeleteJetTree(p context.Context, p1 core.PulseNumber)
- func (m *JetStorageMock) DeleteJetTreeFinished() bool
- func (m *JetStorageMock) DeleteJetTreeMinimockCounter() uint64
- func (m *JetStorageMock) DeleteJetTreeMinimockPreCounter() uint64
- func (m *JetStorageMock) FindJet(p context.Context, p1 core.PulseNumber, p2 core.RecordID) (r *core.RecordID, r1 bool)
- func (m *JetStorageMock) FindJetFinished() bool
- func (m *JetStorageMock) FindJetMinimockCounter() uint64
- func (m *JetStorageMock) FindJetMinimockPreCounter() uint64
- func (m *JetStorageMock) Finish()
- func (m *JetStorageMock) GetJets(p context.Context) (r jet.IDSet, r1 error)
- func (m *JetStorageMock) GetJetsFinished() bool
- func (m *JetStorageMock) GetJetsMinimockCounter() uint64
- func (m *JetStorageMock) GetJetsMinimockPreCounter() uint64
- func (m *JetStorageMock) MinimockFinish()
- func (m *JetStorageMock) MinimockWait(timeout time.Duration)
- func (m *JetStorageMock) SplitJetTree(p context.Context, p1 core.PulseNumber, p2 core.RecordID) (r *core.RecordID, r1 *core.RecordID, r2 error)
- func (m *JetStorageMock) SplitJetTreeFinished() bool
- func (m *JetStorageMock) SplitJetTreeMinimockCounter() uint64
- func (m *JetStorageMock) SplitJetTreeMinimockPreCounter() uint64
- func (m *JetStorageMock) UpdateJetTree(p context.Context, p1 core.PulseNumber, p2 bool, p3 ...core.RecordID)
- func (m *JetStorageMock) UpdateJetTreeFinished() bool
- func (m *JetStorageMock) UpdateJetTreeMinimockCounter() uint64
- func (m *JetStorageMock) UpdateJetTreeMinimockPreCounter() uint64
- func (m *JetStorageMock) ValidateCallCounters()
- func (m *JetStorageMock) Wait(timeout time.Duration)
- type JetStorageMockAddJetsExpectation
- type JetStorageMockAddJetsInput
- type JetStorageMockAddJetsResult
- type JetStorageMockCloneJetTreeExpectation
- type JetStorageMockCloneJetTreeInput
- type JetStorageMockCloneJetTreeResult
- type JetStorageMockDeleteJetTreeExpectation
- type JetStorageMockDeleteJetTreeInput
- type JetStorageMockFindJetExpectation
- type JetStorageMockFindJetInput
- type JetStorageMockFindJetResult
- type JetStorageMockGetJetsExpectation
- type JetStorageMockGetJetsInput
- type JetStorageMockGetJetsResult
- type JetStorageMockSplitJetTreeExpectation
- type JetStorageMockSplitJetTreeInput
- type JetStorageMockSplitJetTreeResult
- type JetStorageMockUpdateJetTreeExpectation
- type JetStorageMockUpdateJetTreeInput
- type Key
- type Node
- func (n Node) Address() string
- func (n Node) ConsensusAddress() string
- func (Node) GetGlobuleID() core.GlobuleID
- func (Node) GetState() core.NodeState
- func (n Node) ID() core.RecordRef
- func (Node) IsWorking() bool
- func (Node) Leaving() bool
- func (Node) LeavingETA() core.PulseNumber
- func (Node) PublicKey() crypto.PublicKey
- func (n Node) Role() core.StaticRole
- func (Node) ShortID() core.ShortNodeID
- func (Node) Version() string
- type NodeStorage
- type NodeStorageMock
- func (m *NodeStorageMock) AllMocksCalled() bool
- func (m *NodeStorageMock) CheckMocksCalled()
- func (m *NodeStorageMock) Finish()
- func (m *NodeStorageMock) GetActiveNodes(p core.PulseNumber) (r []core.Node, r1 error)
- func (m *NodeStorageMock) GetActiveNodesByRole(p core.PulseNumber, p1 core.StaticRole) (r []core.Node, r1 error)
- func (m *NodeStorageMock) GetActiveNodesByRoleFinished() bool
- func (m *NodeStorageMock) GetActiveNodesByRoleMinimockCounter() uint64
- func (m *NodeStorageMock) GetActiveNodesByRoleMinimockPreCounter() uint64
- func (m *NodeStorageMock) GetActiveNodesFinished() bool
- func (m *NodeStorageMock) GetActiveNodesMinimockCounter() uint64
- func (m *NodeStorageMock) GetActiveNodesMinimockPreCounter() uint64
- func (m *NodeStorageMock) MinimockFinish()
- func (m *NodeStorageMock) MinimockWait(timeout time.Duration)
- func (m *NodeStorageMock) RemoveActiveNodesUntil(p core.PulseNumber)
- func (m *NodeStorageMock) RemoveActiveNodesUntilFinished() bool
- func (m *NodeStorageMock) RemoveActiveNodesUntilMinimockCounter() uint64
- func (m *NodeStorageMock) RemoveActiveNodesUntilMinimockPreCounter() uint64
- func (m *NodeStorageMock) SetActiveNodes(p core.PulseNumber, p1 []core.Node) (r error)
- func (m *NodeStorageMock) SetActiveNodesFinished() bool
- func (m *NodeStorageMock) SetActiveNodesMinimockCounter() uint64
- func (m *NodeStorageMock) SetActiveNodesMinimockPreCounter() uint64
- func (m *NodeStorageMock) ValidateCallCounters()
- func (m *NodeStorageMock) Wait(timeout time.Duration)
- type NodeStorageMockGetActiveNodesByRoleExpectation
- type NodeStorageMockGetActiveNodesByRoleInput
- type NodeStorageMockGetActiveNodesByRoleResult
- type NodeStorageMockGetActiveNodesExpectation
- type NodeStorageMockGetActiveNodesInput
- type NodeStorageMockGetActiveNodesResult
- type NodeStorageMockRemoveActiveNodesUntilExpectation
- type NodeStorageMockRemoveActiveNodesUntilInput
- type NodeStorageMockSetActiveNodesExpectation
- type NodeStorageMockSetActiveNodesInput
- type NodeStorageMockSetActiveNodesResult
- type ObjectStorage
- type ObjectStorageMock
- func (m *ObjectStorageMock) AllMocksCalled() bool
- func (m *ObjectStorageMock) CheckMocksCalled()
- func (m *ObjectStorageMock) Finish()
- func (m *ObjectStorageMock) GetBlob(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r []byte, r1 error)
- func (m *ObjectStorageMock) GetBlobFinished() bool
- func (m *ObjectStorageMock) GetBlobMinimockCounter() uint64
- func (m *ObjectStorageMock) GetBlobMinimockPreCounter() uint64
- func (m *ObjectStorageMock) GetObjectIndex(p context.Context, p1 core.RecordID, p2 *core.RecordID, p3 bool) (r *index.ObjectLifeline, r1 error)
- func (m *ObjectStorageMock) GetObjectIndexFinished() bool
- func (m *ObjectStorageMock) GetObjectIndexMinimockCounter() uint64
- func (m *ObjectStorageMock) GetObjectIndexMinimockPreCounter() uint64
- func (m *ObjectStorageMock) GetRecord(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r record.Record, r1 error)
- func (m *ObjectStorageMock) GetRecordFinished() bool
- func (m *ObjectStorageMock) GetRecordMinimockCounter() uint64
- func (m *ObjectStorageMock) GetRecordMinimockPreCounter() uint64
- func (m *ObjectStorageMock) IterateIndexIDs(p context.Context, p1 core.RecordID, p2 func(p core.RecordID) (r error)) (r error)
- func (m *ObjectStorageMock) IterateIndexIDsFinished() bool
- func (m *ObjectStorageMock) IterateIndexIDsMinimockCounter() uint64
- func (m *ObjectStorageMock) IterateIndexIDsMinimockPreCounter() uint64
- func (m *ObjectStorageMock) MinimockFinish()
- func (m *ObjectStorageMock) MinimockWait(timeout time.Duration)
- func (m *ObjectStorageMock) RemoveObjectIndex(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r error)
- func (m *ObjectStorageMock) RemoveObjectIndexFinished() bool
- func (m *ObjectStorageMock) RemoveObjectIndexMinimockCounter() uint64
- func (m *ObjectStorageMock) RemoveObjectIndexMinimockPreCounter() uint64
- func (m *ObjectStorageMock) SetBlob(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 []byte) (r *core.RecordID, r1 error)
- func (m *ObjectStorageMock) SetBlobFinished() bool
- func (m *ObjectStorageMock) SetBlobMinimockCounter() uint64
- func (m *ObjectStorageMock) SetBlobMinimockPreCounter() uint64
- func (m *ObjectStorageMock) SetMessage(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 core.Message) (r error)
- func (m *ObjectStorageMock) SetMessageFinished() bool
- func (m *ObjectStorageMock) SetMessageMinimockCounter() uint64
- func (m *ObjectStorageMock) SetMessageMinimockPreCounter() uint64
- func (m *ObjectStorageMock) SetObjectIndex(p context.Context, p1 core.RecordID, p2 *core.RecordID, ...) (r error)
- func (m *ObjectStorageMock) SetObjectIndexFinished() bool
- func (m *ObjectStorageMock) SetObjectIndexMinimockCounter() uint64
- func (m *ObjectStorageMock) SetObjectIndexMinimockPreCounter() uint64
- func (m *ObjectStorageMock) SetRecord(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 record.Record) (r *core.RecordID, r1 error)
- func (m *ObjectStorageMock) SetRecordFinished() bool
- func (m *ObjectStorageMock) SetRecordMinimockCounter() uint64
- func (m *ObjectStorageMock) SetRecordMinimockPreCounter() uint64
- func (m *ObjectStorageMock) ValidateCallCounters()
- func (m *ObjectStorageMock) Wait(timeout time.Duration)
- type ObjectStorageMockGetBlobExpectation
- type ObjectStorageMockGetBlobInput
- type ObjectStorageMockGetBlobResult
- type ObjectStorageMockGetObjectIndexExpectation
- type ObjectStorageMockGetObjectIndexInput
- type ObjectStorageMockGetObjectIndexResult
- type ObjectStorageMockGetRecordExpectation
- type ObjectStorageMockGetRecordInput
- type ObjectStorageMockGetRecordResult
- type ObjectStorageMockIterateIndexIDsExpectation
- type ObjectStorageMockIterateIndexIDsInput
- type ObjectStorageMockIterateIndexIDsResult
- type ObjectStorageMockRemoveObjectIndexExpectation
- type ObjectStorageMockRemoveObjectIndexInput
- type ObjectStorageMockRemoveObjectIndexResult
- type ObjectStorageMockSetBlobExpectation
- type ObjectStorageMockSetBlobInput
- type ObjectStorageMockSetBlobResult
- type ObjectStorageMockSetMessageExpectation
- type ObjectStorageMockSetMessageInput
- type ObjectStorageMockSetMessageResult
- type ObjectStorageMockSetObjectIndexExpectation
- type ObjectStorageMockSetObjectIndexInput
- type ObjectStorageMockSetObjectIndexResult
- type ObjectStorageMockSetRecordExpectation
- type ObjectStorageMockSetRecordInput
- type ObjectStorageMockSetRecordResult
- type Pulse
- type PulseStorage
- type PulseTracker
- type PulseTrackerMock
- func (m *PulseTrackerMock) AddPulse(p context.Context, p1 core.Pulse) (r error)
- func (m *PulseTrackerMock) AddPulseFinished() bool
- func (m *PulseTrackerMock) AddPulseMinimockCounter() uint64
- func (m *PulseTrackerMock) AddPulseMinimockPreCounter() uint64
- func (m *PulseTrackerMock) AllMocksCalled() bool
- func (m *PulseTrackerMock) CheckMocksCalled()
- func (m *PulseTrackerMock) DeletePulse(p context.Context, p1 core.PulseNumber) (r error)
- func (m *PulseTrackerMock) DeletePulseFinished() bool
- func (m *PulseTrackerMock) DeletePulseMinimockCounter() uint64
- func (m *PulseTrackerMock) DeletePulseMinimockPreCounter() uint64
- func (m *PulseTrackerMock) Finish()
- func (m *PulseTrackerMock) GetLatestPulse(p context.Context) (r *Pulse, r1 error)
- func (m *PulseTrackerMock) GetLatestPulseFinished() bool
- func (m *PulseTrackerMock) GetLatestPulseMinimockCounter() uint64
- func (m *PulseTrackerMock) GetLatestPulseMinimockPreCounter() uint64
- func (m *PulseTrackerMock) GetNthPrevPulse(p context.Context, p1 uint, p2 core.PulseNumber) (r *Pulse, r1 error)
- func (m *PulseTrackerMock) GetNthPrevPulseFinished() bool
- func (m *PulseTrackerMock) GetNthPrevPulseMinimockCounter() uint64
- func (m *PulseTrackerMock) GetNthPrevPulseMinimockPreCounter() uint64
- func (m *PulseTrackerMock) GetPreviousPulse(p context.Context, p1 core.PulseNumber) (r *Pulse, r1 error)
- func (m *PulseTrackerMock) GetPreviousPulseFinished() bool
- func (m *PulseTrackerMock) GetPreviousPulseMinimockCounter() uint64
- func (m *PulseTrackerMock) GetPreviousPulseMinimockPreCounter() uint64
- func (m *PulseTrackerMock) GetPulse(p context.Context, p1 core.PulseNumber) (r *Pulse, r1 error)
- func (m *PulseTrackerMock) GetPulseFinished() bool
- func (m *PulseTrackerMock) GetPulseMinimockCounter() uint64
- func (m *PulseTrackerMock) GetPulseMinimockPreCounter() uint64
- func (m *PulseTrackerMock) MinimockFinish()
- func (m *PulseTrackerMock) MinimockWait(timeout time.Duration)
- func (m *PulseTrackerMock) ValidateCallCounters()
- func (m *PulseTrackerMock) Wait(timeout time.Duration)
- type PulseTrackerMockAddPulseExpectation
- type PulseTrackerMockAddPulseInput
- type PulseTrackerMockAddPulseResult
- type PulseTrackerMockDeletePulseExpectation
- type PulseTrackerMockDeletePulseInput
- type PulseTrackerMockDeletePulseResult
- type PulseTrackerMockGetLatestPulseExpectation
- type PulseTrackerMockGetLatestPulseInput
- type PulseTrackerMockGetLatestPulseResult
- type PulseTrackerMockGetNthPrevPulseExpectation
- type PulseTrackerMockGetNthPrevPulseInput
- type PulseTrackerMockGetNthPrevPulseResult
- type PulseTrackerMockGetPreviousPulseExpectation
- type PulseTrackerMockGetPreviousPulseInput
- type PulseTrackerMockGetPreviousPulseResult
- type PulseTrackerMockGetPulseExpectation
- type PulseTrackerMockGetPulseInput
- type PulseTrackerMockGetPulseResult
- type ReplicaIter
- type ReplicaStorage
- type ReplicaStorageMock
- func (m *ReplicaStorageMock) AllMocksCalled() bool
- func (m *ReplicaStorageMock) CheckMocksCalled()
- func (m *ReplicaStorageMock) Finish()
- func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJets(p context.Context) (r map[core.RecordID][]core.PulseNumber, r1 error)
- func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJetsFinished() bool
- func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJetsMinimockCounter() uint64
- func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJetsMinimockPreCounter() uint64
- func (m *ReplicaStorageMock) GetAllSyncClientJets(p context.Context) (r map[core.RecordID][]core.PulseNumber, r1 error)
- func (m *ReplicaStorageMock) GetAllSyncClientJetsFinished() bool
- func (m *ReplicaStorageMock) GetAllSyncClientJetsMinimockCounter() uint64
- func (m *ReplicaStorageMock) GetAllSyncClientJetsMinimockPreCounter() uint64
- func (m *ReplicaStorageMock) GetHeavySyncedPulse(p context.Context, p1 core.RecordID) (r core.PulseNumber, r1 error)
- func (m *ReplicaStorageMock) GetHeavySyncedPulseFinished() bool
- func (m *ReplicaStorageMock) GetHeavySyncedPulseMinimockCounter() uint64
- func (m *ReplicaStorageMock) GetHeavySyncedPulseMinimockPreCounter() uint64
- func (m *ReplicaStorageMock) GetSyncClientJetPulses(p context.Context, p1 core.RecordID) (r []core.PulseNumber, r1 error)
- func (m *ReplicaStorageMock) GetSyncClientJetPulsesFinished() bool
- func (m *ReplicaStorageMock) GetSyncClientJetPulsesMinimockCounter() uint64
- func (m *ReplicaStorageMock) GetSyncClientJetPulsesMinimockPreCounter() uint64
- func (m *ReplicaStorageMock) MinimockFinish()
- func (m *ReplicaStorageMock) MinimockWait(timeout time.Duration)
- func (m *ReplicaStorageMock) SetHeavySyncedPulse(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r error)
- func (m *ReplicaStorageMock) SetHeavySyncedPulseFinished() bool
- func (m *ReplicaStorageMock) SetHeavySyncedPulseMinimockCounter() uint64
- func (m *ReplicaStorageMock) SetHeavySyncedPulseMinimockPreCounter() uint64
- func (m *ReplicaStorageMock) SetSyncClientJetPulses(p context.Context, p1 core.RecordID, p2 []core.PulseNumber) (r error)
- func (m *ReplicaStorageMock) SetSyncClientJetPulsesFinished() bool
- func (m *ReplicaStorageMock) SetSyncClientJetPulsesMinimockCounter() uint64
- func (m *ReplicaStorageMock) SetSyncClientJetPulsesMinimockPreCounter() uint64
- func (m *ReplicaStorageMock) ValidateCallCounters()
- func (m *ReplicaStorageMock) Wait(timeout time.Duration)
- type ReplicaStorageMockGetAllNonEmptySyncClientJetsExpectation
- type ReplicaStorageMockGetAllNonEmptySyncClientJetsInput
- type ReplicaStorageMockGetAllNonEmptySyncClientJetsResult
- type ReplicaStorageMockGetAllSyncClientJetsExpectation
- type ReplicaStorageMockGetAllSyncClientJetsInput
- type ReplicaStorageMockGetAllSyncClientJetsResult
- type ReplicaStorageMockGetHeavySyncedPulseExpectation
- type ReplicaStorageMockGetHeavySyncedPulseInput
- type ReplicaStorageMockGetHeavySyncedPulseResult
- type ReplicaStorageMockGetSyncClientJetPulsesExpectation
- type ReplicaStorageMockGetSyncClientJetPulsesInput
- type ReplicaStorageMockGetSyncClientJetPulsesResult
- type ReplicaStorageMockSetHeavySyncedPulseExpectation
- type ReplicaStorageMockSetHeavySyncedPulseInput
- type ReplicaStorageMockSetHeavySyncedPulseResult
- type ReplicaStorageMockSetSyncClientJetPulsesExpectation
- type ReplicaStorageMockSetSyncClientJetPulsesInput
- type ReplicaStorageMockSetSyncClientJetPulsesResult
- type RmStat
- type Store
- type TransactionManager
- func (m *TransactionManager) Commit() error
- func (m *TransactionManager) Discard()
- func (m *TransactionManager) GetBlob(ctx context.Context, jetID core.RecordID, id *core.RecordID) ([]byte, error)
- func (m *TransactionManager) GetLatestPulse(ctx context.Context) (*Pulse, error)
- func (m *TransactionManager) GetObjectIndex(ctx context.Context, jetID core.RecordID, id *core.RecordID, forupdate bool) (*index.ObjectLifeline, error)
- func (m *TransactionManager) GetPulse(ctx context.Context, num core.PulseNumber) (*Pulse, error)
- func (m *TransactionManager) GetRecord(ctx context.Context, jetID core.RecordID, id *core.RecordID) (record.Record, error)
- func (m *TransactionManager) GetRequest(ctx context.Context, jetID core.RecordID, id *core.RecordID) (record.Request, error)
- func (m *TransactionManager) RemoveObjectIndex(ctx context.Context, jetID core.RecordID, ref *core.RecordID) error
- func (m *TransactionManager) SetBlob(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, ...) (*core.RecordID, error)
- func (m *TransactionManager) SetObjectIndex(ctx context.Context, jetID core.RecordID, id *core.RecordID, ...) error
- func (m *TransactionManager) SetRecord(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, ...) (*core.RecordID, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound returns if record/index not found in storage. ErrNotFound = errors.New("storage object not found") // ErrConflictRetriesOver is returned if Update transaction fails on all retry attempts. ErrConflictRetriesOver = errors.New("transaction conflict retries limit exceeded") // ErrConflict is the alias for badger.ErrConflict. ErrConflict = badger.ErrConflict // ErrOverride is returned if something tries to update existing record. ErrOverride = errors.New("records override is forbidden") // ErrClosed is returned when attempt to read or write to closed db. ErrClosed = errors.New("db is closed") // ErrPrevPulse is returned if previous pulse not found in storage ErrPrevPulse = errors.New("previous pulse not found") // ErrBadPulse is returned when pulse less than latest ErrBadPulse = errors.New("pulse should be bigger than latest") )
var ErrReplicatorDone = errors.New("no more items in iterator")
ErrReplicatorDone is returned by an Replicator NextRecords method when the iteration is complete.
Functions ¶
func NullifyJetInKey ¶ added in v0.7.5
func NullifyJetInKey(key []byte)
NullifyJetInKey nullify jet part in record.
Types ¶
type Cleaner ¶ added in v0.7.5
type Cleaner interface { CleanJetRecordsUntilPulse( ctx context.Context, jetID core.RecordID, pn core.PulseNumber, ) (map[string]RmStat, error) CleanJetIndexes( ctx context.Context, jetID core.RecordID, recent recentstorage.RecentIndexStorage, candidates []core.RecordID, ) (RmStat, error) }
Cleaner cleans lights after sync to heavy
func NewCleaner ¶ added in v0.8.0
func NewCleaner() Cleaner
NewCleaner is a constructor for Cleaner.
type CleanerMock ¶ added in v0.7.5
type CleanerMock struct { CleanJetIndexesFunc func(p context.Context, p1 core.RecordID, p2 recentstorage.RecentIndexStorage, p3 []core.RecordID) (r RmStat, r1 error) CleanJetIndexesCounter uint64 CleanJetIndexesPreCounter uint64 CleanJetIndexesMock mCleanerMockCleanJetIndexes CleanJetRecordsUntilPulseFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r map[string]RmStat, r1 error) CleanJetRecordsUntilPulseCounter uint64 CleanJetRecordsUntilPulsePreCounter uint64 CleanJetRecordsUntilPulseMock mCleanerMockCleanJetRecordsUntilPulse // contains filtered or unexported fields }
CleanerMock implements github.com/insolar/insolar/ledger/storage.Cleaner
func NewCleanerMock ¶ added in v0.7.5
func NewCleanerMock(t minimock.Tester) *CleanerMock
NewCleanerMock returns a mock for github.com/insolar/insolar/ledger/storage.Cleaner
func (*CleanerMock) AllMocksCalled ¶ added in v0.7.5
func (m *CleanerMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*CleanerMock) CheckMocksCalled ¶ added in v0.7.5
func (m *CleanerMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*CleanerMock) CleanJetIndexes ¶ added in v0.8.0
func (m *CleanerMock) CleanJetIndexes(p context.Context, p1 core.RecordID, p2 recentstorage.RecentIndexStorage, p3 []core.RecordID) (r RmStat, r1 error)
CleanJetIndexes implements github.com/insolar/insolar/ledger/storage.Cleaner interface
func (*CleanerMock) CleanJetIndexesFinished ¶ added in v0.8.0
func (m *CleanerMock) CleanJetIndexesFinished() bool
CleanJetIndexesFinished returns true if mock invocations count is ok
func (*CleanerMock) CleanJetIndexesMinimockCounter ¶ added in v0.8.0
func (m *CleanerMock) CleanJetIndexesMinimockCounter() uint64
CleanJetIndexesMinimockCounter returns a count of CleanerMock.CleanJetIndexesFunc invocations
func (*CleanerMock) CleanJetIndexesMinimockPreCounter ¶ added in v0.8.0
func (m *CleanerMock) CleanJetIndexesMinimockPreCounter() uint64
CleanJetIndexesMinimockPreCounter returns the value of CleanerMock.CleanJetIndexes invocations
func (*CleanerMock) CleanJetRecordsUntilPulse ¶ added in v0.8.0
func (m *CleanerMock) CleanJetRecordsUntilPulse(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r map[string]RmStat, r1 error)
CleanJetRecordsUntilPulse implements github.com/insolar/insolar/ledger/storage.Cleaner interface
func (*CleanerMock) CleanJetRecordsUntilPulseFinished ¶ added in v0.8.0
func (m *CleanerMock) CleanJetRecordsUntilPulseFinished() bool
CleanJetRecordsUntilPulseFinished returns true if mock invocations count is ok
func (*CleanerMock) CleanJetRecordsUntilPulseMinimockCounter ¶ added in v0.8.0
func (m *CleanerMock) CleanJetRecordsUntilPulseMinimockCounter() uint64
CleanJetRecordsUntilPulseMinimockCounter returns a count of CleanerMock.CleanJetRecordsUntilPulseFunc invocations
func (*CleanerMock) CleanJetRecordsUntilPulseMinimockPreCounter ¶ added in v0.8.0
func (m *CleanerMock) CleanJetRecordsUntilPulseMinimockPreCounter() uint64
CleanJetRecordsUntilPulseMinimockPreCounter returns the value of CleanerMock.CleanJetRecordsUntilPulse invocations
func (*CleanerMock) Finish ¶ added in v0.7.5
func (m *CleanerMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*CleanerMock) MinimockFinish ¶ added in v0.7.5
func (m *CleanerMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*CleanerMock) MinimockWait ¶ added in v0.7.5
func (m *CleanerMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*CleanerMock) ValidateCallCounters ¶ added in v0.7.5
func (m *CleanerMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*CleanerMock) Wait ¶ added in v0.7.5
func (m *CleanerMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type CleanerMockCleanJetIndexesExpectation ¶ added in v0.8.0
type CleanerMockCleanJetIndexesExpectation struct {
// contains filtered or unexported fields
}
func (*CleanerMockCleanJetIndexesExpectation) Return ¶ added in v0.8.0
func (e *CleanerMockCleanJetIndexesExpectation) Return(r RmStat, r1 error)
type CleanerMockCleanJetIndexesInput ¶ added in v0.8.0
type CleanerMockCleanJetIndexesInput struct {
// contains filtered or unexported fields
}
type CleanerMockCleanJetIndexesResult ¶ added in v0.8.0
type CleanerMockCleanJetIndexesResult struct {
// contains filtered or unexported fields
}
type CleanerMockCleanJetRecordsUntilPulseExpectation ¶ added in v0.8.0
type CleanerMockCleanJetRecordsUntilPulseExpectation struct {
// contains filtered or unexported fields
}
type CleanerMockCleanJetRecordsUntilPulseInput ¶ added in v0.8.0
type CleanerMockCleanJetRecordsUntilPulseInput struct {
// contains filtered or unexported fields
}
type CleanerMockCleanJetRecordsUntilPulseResult ¶ added in v0.8.0
type CleanerMockCleanJetRecordsUntilPulseResult struct {
// contains filtered or unexported fields
}
type DB ¶ added in v0.0.6
type DB struct { PlatformCryptographyScheme core.PlatformCryptographyScheme `inject:""` // contains filtered or unexported fields }
DB represents BadgerDB storage implementation.
func (*DB) BeginTransaction ¶ added in v0.0.6
func (db *DB) BeginTransaction(update bool) (*TransactionManager, error)
BeginTransaction opens a new transaction. All methods called on returned transaction manager will persist changes only after success on "Commit" call.
func (*DB) Close ¶ added in v0.0.6
Close wraps BadgerDB Close method.
From https://godoc.org/github.com/dgraph-io/badger#DB.Close: «It's crucial to call it to ensure all the pending updates make their way to disk. Calling DB.Close() multiple times is not safe and wouldcause panic.»
func (*DB) GetBadgerDB ¶ added in v0.6.1
GetBadgerDB return badger.DB instance (for internal usage, like tests)
func (*DB) GetLocalData ¶ added in v0.6.3
GetLocalData retrieves data from storage.
func (*DB) GetPlatformCryptographyScheme ¶ added in v0.8.0
func (db *DB) GetPlatformCryptographyScheme() core.PlatformCryptographyScheme
func (*DB) IterateLocalData ¶ added in v0.6.3
func (db *DB) IterateLocalData( ctx context.Context, pulse core.PulseNumber, prefix []byte, handler func(k, v []byte) error, ) error
IterateLocalData iterates over all record with specified prefix and calls handler with key and value of that record.
The key will be returned without prefix (e.g. the remaining slice) and value will be returned as it was saved.
func (*DB) IterateRecordsOnPulse ¶ added in v0.7.5
func (db *DB) IterateRecordsOnPulse( ctx context.Context, jetID core.RecordID, pulse core.PulseNumber, handler func(id core.RecordID, rec record.Record) error, ) error
IterateRecordsOnPulse iterates over records on provided Jet ID and Pulse.
func (*DB) SetLocalData ¶ added in v0.6.3
func (db *DB) SetLocalData(ctx context.Context, pulse core.PulseNumber, key []byte, data []byte) error
SetLocalData saves provided data to storage.
func (*DB) SetTxRetiries ¶ added in v0.0.6
SetTxRetiries sets number of retries on conflict in Update
func (*DB) StoreKeyValues ¶ added in v0.6.3
StoreKeyValues stores provided key/value pairs.
type DBContext ¶ added in v0.7.5
type DBContext interface { SetTxRetiries(n int) BeginTransaction(update bool) (*TransactionManager, error) View(ctx context.Context, fn func(*TransactionManager) error) error Update(ctx context.Context, fn func(*TransactionManager) error) error SetLocalData(ctx context.Context, pulse core.PulseNumber, key []byte, data []byte) error GetLocalData(ctx context.Context, pulse core.PulseNumber, key []byte) ([]byte, error) IterateLocalData( ctx context.Context, pulse core.PulseNumber, prefix []byte, handler func(k, v []byte) error, ) error IterateRecordsOnPulse( ctx context.Context, jetID core.RecordID, pulse core.PulseNumber, handler func(id core.RecordID, rec record.Record) error, ) error StoreKeyValues(ctx context.Context, kvs []core.KV) error GetBadgerDB() *badger.DB Close() error GetPlatformCryptographyScheme() core.PlatformCryptographyScheme // contains filtered or unexported methods }
DBContext provides base db methods
type DBContextMock ¶ added in v0.7.5
type DBContextMock struct { BeginTransactionFunc func(p bool) (r *TransactionManager, r1 error) BeginTransactionCounter uint64 BeginTransactionPreCounter uint64 BeginTransactionMock mDBContextMockBeginTransaction CloseFunc func() (r error) CloseCounter uint64 ClosePreCounter uint64 CloseMock mDBContextMockClose GetBadgerDBFunc func() (r *badger.DB) GetBadgerDBCounter uint64 GetBadgerDBPreCounter uint64 GetBadgerDBMock mDBContextMockGetBadgerDB GetLocalDataFunc func(p context.Context, p1 core.PulseNumber, p2 []byte) (r []byte, r1 error) GetLocalDataCounter uint64 GetLocalDataPreCounter uint64 GetLocalDataMock mDBContextMockGetLocalData GetPlatformCryptographySchemeFunc func() (r core.PlatformCryptographyScheme) GetPlatformCryptographySchemeCounter uint64 GetPlatformCryptographySchemePreCounter uint64 GetPlatformCryptographySchemeMock mDBContextMockGetPlatformCryptographyScheme IterateLocalDataFunc func(p context.Context, p1 core.PulseNumber, p2 []byte, p3 func(p []byte, p1 []byte) (r error)) (r error) IterateLocalDataCounter uint64 IterateLocalDataPreCounter uint64 IterateLocalDataMock mDBContextMockIterateLocalData IterateRecordsOnPulseFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 func(p core.RecordID, p1 record.Record) (r error)) (r error) IterateRecordsOnPulseCounter uint64 IterateRecordsOnPulsePreCounter uint64 IterateRecordsOnPulseMock mDBContextMockIterateRecordsOnPulse SetLocalDataFunc func(p context.Context, p1 core.PulseNumber, p2 []byte, p3 []byte) (r error) SetLocalDataCounter uint64 SetLocalDataPreCounter uint64 SetLocalDataMock mDBContextMockSetLocalData SetTxRetiriesFunc func(p int) SetTxRetiriesCounter uint64 SetTxRetiriesPreCounter uint64 SetTxRetiriesMock mDBContextMockSetTxRetiries StoreKeyValuesFunc func(p context.Context, p1 []core.KV) (r error) StoreKeyValuesCounter uint64 StoreKeyValuesPreCounter uint64 StoreKeyValuesMock mDBContextMockStoreKeyValues UpdateFunc func(p context.Context, p1 func(p *TransactionManager) (r error)) (r error) UpdateCounter uint64 UpdatePreCounter uint64 UpdateMock mDBContextMockUpdate ViewFunc func(p context.Context, p1 func(p *TransactionManager) (r error)) (r error) ViewCounter uint64 ViewPreCounter uint64 ViewMock mDBContextMockView // contains filtered or unexported fields }
DBContextMock implements github.com/insolar/insolar/ledger/storage.DBContext
func NewDBContextMock ¶ added in v0.7.5
func NewDBContextMock(t minimock.Tester) *DBContextMock
NewDBContextMock returns a mock for github.com/insolar/insolar/ledger/storage.DBContext
func (*DBContextMock) AllMocksCalled ¶ added in v0.7.5
func (m *DBContextMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*DBContextMock) BeginTransaction ¶ added in v0.7.5
func (m *DBContextMock) BeginTransaction(p bool) (r *TransactionManager, r1 error)
BeginTransaction implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) BeginTransactionFinished ¶ added in v0.7.5
func (m *DBContextMock) BeginTransactionFinished() bool
BeginTransactionFinished returns true if mock invocations count is ok
func (*DBContextMock) BeginTransactionMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) BeginTransactionMinimockCounter() uint64
BeginTransactionMinimockCounter returns a count of DBContextMock.BeginTransactionFunc invocations
func (*DBContextMock) BeginTransactionMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) BeginTransactionMinimockPreCounter() uint64
BeginTransactionMinimockPreCounter returns the value of DBContextMock.BeginTransaction invocations
func (*DBContextMock) CheckMocksCalled ¶ added in v0.7.5
func (m *DBContextMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*DBContextMock) Close ¶ added in v0.7.5
func (m *DBContextMock) Close() (r error)
Close implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) CloseFinished ¶ added in v0.7.5
func (m *DBContextMock) CloseFinished() bool
CloseFinished returns true if mock invocations count is ok
func (*DBContextMock) CloseMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) CloseMinimockCounter() uint64
CloseMinimockCounter returns a count of DBContextMock.CloseFunc invocations
func (*DBContextMock) CloseMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) CloseMinimockPreCounter() uint64
CloseMinimockPreCounter returns the value of DBContextMock.Close invocations
func (*DBContextMock) Finish ¶ added in v0.7.5
func (m *DBContextMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*DBContextMock) GetBadgerDB ¶ added in v0.7.5
func (m *DBContextMock) GetBadgerDB() (r *badger.DB)
GetBadgerDB implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) GetBadgerDBFinished ¶ added in v0.7.5
func (m *DBContextMock) GetBadgerDBFinished() bool
GetBadgerDBFinished returns true if mock invocations count is ok
func (*DBContextMock) GetBadgerDBMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) GetBadgerDBMinimockCounter() uint64
GetBadgerDBMinimockCounter returns a count of DBContextMock.GetBadgerDBFunc invocations
func (*DBContextMock) GetBadgerDBMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) GetBadgerDBMinimockPreCounter() uint64
GetBadgerDBMinimockPreCounter returns the value of DBContextMock.GetBadgerDB invocations
func (*DBContextMock) GetLocalData ¶ added in v0.7.5
func (m *DBContextMock) GetLocalData(p context.Context, p1 core.PulseNumber, p2 []byte) (r []byte, r1 error)
GetLocalData implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) GetLocalDataFinished ¶ added in v0.7.5
func (m *DBContextMock) GetLocalDataFinished() bool
GetLocalDataFinished returns true if mock invocations count is ok
func (*DBContextMock) GetLocalDataMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) GetLocalDataMinimockCounter() uint64
GetLocalDataMinimockCounter returns a count of DBContextMock.GetLocalDataFunc invocations
func (*DBContextMock) GetLocalDataMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) GetLocalDataMinimockPreCounter() uint64
GetLocalDataMinimockPreCounter returns the value of DBContextMock.GetLocalData invocations
func (*DBContextMock) GetPlatformCryptographyScheme ¶ added in v0.8.0
func (m *DBContextMock) GetPlatformCryptographyScheme() (r core.PlatformCryptographyScheme)
GetPlatformCryptographyScheme implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) GetPlatformCryptographySchemeFinished ¶ added in v0.8.0
func (m *DBContextMock) GetPlatformCryptographySchemeFinished() bool
GetPlatformCryptographySchemeFinished returns true if mock invocations count is ok
func (*DBContextMock) GetPlatformCryptographySchemeMinimockCounter ¶ added in v0.8.0
func (m *DBContextMock) GetPlatformCryptographySchemeMinimockCounter() uint64
GetPlatformCryptographySchemeMinimockCounter returns a count of DBContextMock.GetPlatformCryptographySchemeFunc invocations
func (*DBContextMock) GetPlatformCryptographySchemeMinimockPreCounter ¶ added in v0.8.0
func (m *DBContextMock) GetPlatformCryptographySchemeMinimockPreCounter() uint64
GetPlatformCryptographySchemeMinimockPreCounter returns the value of DBContextMock.GetPlatformCryptographyScheme invocations
func (*DBContextMock) IterateLocalData ¶ added in v0.8.0
func (m *DBContextMock) IterateLocalData(p context.Context, p1 core.PulseNumber, p2 []byte, p3 func(p []byte, p1 []byte) (r error)) (r error)
IterateLocalData implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) IterateLocalDataFinished ¶ added in v0.8.0
func (m *DBContextMock) IterateLocalDataFinished() bool
IterateLocalDataFinished returns true if mock invocations count is ok
func (*DBContextMock) IterateLocalDataMinimockCounter ¶ added in v0.8.0
func (m *DBContextMock) IterateLocalDataMinimockCounter() uint64
IterateLocalDataMinimockCounter returns a count of DBContextMock.IterateLocalDataFunc invocations
func (*DBContextMock) IterateLocalDataMinimockPreCounter ¶ added in v0.8.0
func (m *DBContextMock) IterateLocalDataMinimockPreCounter() uint64
IterateLocalDataMinimockPreCounter returns the value of DBContextMock.IterateLocalData invocations
func (*DBContextMock) IterateRecordsOnPulse ¶ added in v0.8.0
func (m *DBContextMock) IterateRecordsOnPulse(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 func(p core.RecordID, p1 record.Record) (r error)) (r error)
IterateRecordsOnPulse implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) IterateRecordsOnPulseFinished ¶ added in v0.8.0
func (m *DBContextMock) IterateRecordsOnPulseFinished() bool
IterateRecordsOnPulseFinished returns true if mock invocations count is ok
func (*DBContextMock) IterateRecordsOnPulseMinimockCounter ¶ added in v0.8.0
func (m *DBContextMock) IterateRecordsOnPulseMinimockCounter() uint64
IterateRecordsOnPulseMinimockCounter returns a count of DBContextMock.IterateRecordsOnPulseFunc invocations
func (*DBContextMock) IterateRecordsOnPulseMinimockPreCounter ¶ added in v0.8.0
func (m *DBContextMock) IterateRecordsOnPulseMinimockPreCounter() uint64
IterateRecordsOnPulseMinimockPreCounter returns the value of DBContextMock.IterateRecordsOnPulse invocations
func (*DBContextMock) MinimockFinish ¶ added in v0.7.5
func (m *DBContextMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*DBContextMock) MinimockWait ¶ added in v0.7.5
func (m *DBContextMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*DBContextMock) SetLocalData ¶ added in v0.7.5
func (m *DBContextMock) SetLocalData(p context.Context, p1 core.PulseNumber, p2 []byte, p3 []byte) (r error)
SetLocalData implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) SetLocalDataFinished ¶ added in v0.7.5
func (m *DBContextMock) SetLocalDataFinished() bool
SetLocalDataFinished returns true if mock invocations count is ok
func (*DBContextMock) SetLocalDataMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) SetLocalDataMinimockCounter() uint64
SetLocalDataMinimockCounter returns a count of DBContextMock.SetLocalDataFunc invocations
func (*DBContextMock) SetLocalDataMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) SetLocalDataMinimockPreCounter() uint64
SetLocalDataMinimockPreCounter returns the value of DBContextMock.SetLocalData invocations
func (*DBContextMock) SetTxRetiries ¶ added in v0.7.5
func (m *DBContextMock) SetTxRetiries(p int)
SetTxRetiries implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) SetTxRetiriesFinished ¶ added in v0.7.5
func (m *DBContextMock) SetTxRetiriesFinished() bool
SetTxRetiriesFinished returns true if mock invocations count is ok
func (*DBContextMock) SetTxRetiriesMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) SetTxRetiriesMinimockCounter() uint64
SetTxRetiriesMinimockCounter returns a count of DBContextMock.SetTxRetiriesFunc invocations
func (*DBContextMock) SetTxRetiriesMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) SetTxRetiriesMinimockPreCounter() uint64
SetTxRetiriesMinimockPreCounter returns the value of DBContextMock.SetTxRetiries invocations
func (*DBContextMock) StoreKeyValues ¶ added in v0.7.5
StoreKeyValues implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) StoreKeyValuesFinished ¶ added in v0.7.5
func (m *DBContextMock) StoreKeyValuesFinished() bool
StoreKeyValuesFinished returns true if mock invocations count is ok
func (*DBContextMock) StoreKeyValuesMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) StoreKeyValuesMinimockCounter() uint64
StoreKeyValuesMinimockCounter returns a count of DBContextMock.StoreKeyValuesFunc invocations
func (*DBContextMock) StoreKeyValuesMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) StoreKeyValuesMinimockPreCounter() uint64
StoreKeyValuesMinimockPreCounter returns the value of DBContextMock.StoreKeyValues invocations
func (*DBContextMock) Update ¶ added in v0.7.5
func (m *DBContextMock) Update(p context.Context, p1 func(p *TransactionManager) (r error)) (r error)
Update implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) UpdateFinished ¶ added in v0.7.5
func (m *DBContextMock) UpdateFinished() bool
UpdateFinished returns true if mock invocations count is ok
func (*DBContextMock) UpdateMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) UpdateMinimockCounter() uint64
UpdateMinimockCounter returns a count of DBContextMock.UpdateFunc invocations
func (*DBContextMock) UpdateMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) UpdateMinimockPreCounter() uint64
UpdateMinimockPreCounter returns the value of DBContextMock.Update invocations
func (*DBContextMock) ValidateCallCounters ¶ added in v0.7.5
func (m *DBContextMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*DBContextMock) View ¶ added in v0.7.5
func (m *DBContextMock) View(p context.Context, p1 func(p *TransactionManager) (r error)) (r error)
View implements github.com/insolar/insolar/ledger/storage.DBContext interface
func (*DBContextMock) ViewFinished ¶ added in v0.7.5
func (m *DBContextMock) ViewFinished() bool
ViewFinished returns true if mock invocations count is ok
func (*DBContextMock) ViewMinimockCounter ¶ added in v0.7.5
func (m *DBContextMock) ViewMinimockCounter() uint64
ViewMinimockCounter returns a count of DBContextMock.ViewFunc invocations
func (*DBContextMock) ViewMinimockPreCounter ¶ added in v0.7.5
func (m *DBContextMock) ViewMinimockPreCounter() uint64
ViewMinimockPreCounter returns the value of DBContextMock.View invocations
func (*DBContextMock) Wait ¶ added in v0.7.5
func (m *DBContextMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type DBContextMockBeginTransactionExpectation ¶ added in v0.7.5
type DBContextMockBeginTransactionExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockBeginTransactionExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockBeginTransactionExpectation) Return(r *TransactionManager, r1 error)
type DBContextMockBeginTransactionInput ¶ added in v0.7.5
type DBContextMockBeginTransactionInput struct {
// contains filtered or unexported fields
}
type DBContextMockBeginTransactionResult ¶ added in v0.7.5
type DBContextMockBeginTransactionResult struct {
// contains filtered or unexported fields
}
type DBContextMockCloseExpectation ¶ added in v0.7.5
type DBContextMockCloseExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockCloseExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockCloseExpectation) Return(r error)
type DBContextMockCloseResult ¶ added in v0.7.5
type DBContextMockCloseResult struct {
// contains filtered or unexported fields
}
type DBContextMockGetBadgerDBExpectation ¶ added in v0.7.5
type DBContextMockGetBadgerDBExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockGetBadgerDBExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockGetBadgerDBExpectation) Return(r *badger.DB)
type DBContextMockGetBadgerDBResult ¶ added in v0.7.5
type DBContextMockGetBadgerDBResult struct {
// contains filtered or unexported fields
}
type DBContextMockGetLocalDataExpectation ¶ added in v0.7.5
type DBContextMockGetLocalDataExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockGetLocalDataExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockGetLocalDataExpectation) Return(r []byte, r1 error)
type DBContextMockGetLocalDataInput ¶ added in v0.7.5
type DBContextMockGetLocalDataInput struct {
// contains filtered or unexported fields
}
type DBContextMockGetLocalDataResult ¶ added in v0.7.5
type DBContextMockGetLocalDataResult struct {
// contains filtered or unexported fields
}
type DBContextMockGetPlatformCryptographySchemeExpectation ¶ added in v0.8.0
type DBContextMockGetPlatformCryptographySchemeExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockGetPlatformCryptographySchemeExpectation) Return ¶ added in v0.8.0
func (e *DBContextMockGetPlatformCryptographySchemeExpectation) Return(r core.PlatformCryptographyScheme)
type DBContextMockGetPlatformCryptographySchemeResult ¶ added in v0.8.0
type DBContextMockGetPlatformCryptographySchemeResult struct {
// contains filtered or unexported fields
}
type DBContextMockIterateLocalDataExpectation ¶ added in v0.8.0
type DBContextMockIterateLocalDataExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockIterateLocalDataExpectation) Return ¶ added in v0.8.0
func (e *DBContextMockIterateLocalDataExpectation) Return(r error)
type DBContextMockIterateLocalDataInput ¶ added in v0.8.0
type DBContextMockIterateLocalDataInput struct {
// contains filtered or unexported fields
}
type DBContextMockIterateLocalDataResult ¶ added in v0.8.0
type DBContextMockIterateLocalDataResult struct {
// contains filtered or unexported fields
}
type DBContextMockIterateRecordsOnPulseExpectation ¶ added in v0.8.0
type DBContextMockIterateRecordsOnPulseExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockIterateRecordsOnPulseExpectation) Return ¶ added in v0.8.0
func (e *DBContextMockIterateRecordsOnPulseExpectation) Return(r error)
type DBContextMockIterateRecordsOnPulseInput ¶ added in v0.8.0
type DBContextMockIterateRecordsOnPulseInput struct {
// contains filtered or unexported fields
}
type DBContextMockIterateRecordsOnPulseResult ¶ added in v0.8.0
type DBContextMockIterateRecordsOnPulseResult struct {
// contains filtered or unexported fields
}
type DBContextMockSetLocalDataExpectation ¶ added in v0.7.5
type DBContextMockSetLocalDataExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockSetLocalDataExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockSetLocalDataExpectation) Return(r error)
type DBContextMockSetLocalDataInput ¶ added in v0.7.5
type DBContextMockSetLocalDataInput struct {
// contains filtered or unexported fields
}
type DBContextMockSetLocalDataResult ¶ added in v0.7.5
type DBContextMockSetLocalDataResult struct {
// contains filtered or unexported fields
}
type DBContextMockSetTxRetiriesExpectation ¶ added in v0.7.5
type DBContextMockSetTxRetiriesExpectation struct {
// contains filtered or unexported fields
}
type DBContextMockSetTxRetiriesInput ¶ added in v0.7.5
type DBContextMockSetTxRetiriesInput struct {
// contains filtered or unexported fields
}
type DBContextMockStoreKeyValuesExpectation ¶ added in v0.7.5
type DBContextMockStoreKeyValuesExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockStoreKeyValuesExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockStoreKeyValuesExpectation) Return(r error)
type DBContextMockStoreKeyValuesInput ¶ added in v0.7.5
type DBContextMockStoreKeyValuesInput struct {
// contains filtered or unexported fields
}
type DBContextMockStoreKeyValuesResult ¶ added in v0.7.5
type DBContextMockStoreKeyValuesResult struct {
// contains filtered or unexported fields
}
type DBContextMockUpdateExpectation ¶ added in v0.7.5
type DBContextMockUpdateExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockUpdateExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockUpdateExpectation) Return(r error)
type DBContextMockUpdateInput ¶ added in v0.7.5
type DBContextMockUpdateInput struct {
// contains filtered or unexported fields
}
type DBContextMockUpdateResult ¶ added in v0.7.5
type DBContextMockUpdateResult struct {
// contains filtered or unexported fields
}
type DBContextMockViewExpectation ¶ added in v0.7.5
type DBContextMockViewExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockViewExpectation) Return ¶ added in v0.7.5
func (e *DBContextMockViewExpectation) Return(r error)
type DBContextMockViewInput ¶ added in v0.7.5
type DBContextMockViewInput struct {
// contains filtered or unexported fields
}
type DBContextMockViewResult ¶ added in v0.7.5
type DBContextMockViewResult struct {
// contains filtered or unexported fields
}
type DBContextMockgetExpectation ¶ added in v0.8.0
type DBContextMockgetExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockgetExpectation) Return ¶ added in v0.8.0
func (e *DBContextMockgetExpectation) Return(r []byte, r1 error)
type DBContextMockgetInput ¶ added in v0.8.0
type DBContextMockgetInput struct {
// contains filtered or unexported fields
}
type DBContextMockgetResult ¶ added in v0.8.0
type DBContextMockgetResult struct {
// contains filtered or unexported fields
}
type DBContextMockiterateExpectation ¶ added in v0.8.0
type DBContextMockiterateExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMockiterateExpectation) Return ¶ added in v0.8.0
func (e *DBContextMockiterateExpectation) Return(r error)
type DBContextMockiterateInput ¶ added in v0.8.0
type DBContextMockiterateInput struct {
// contains filtered or unexported fields
}
type DBContextMockiterateResult ¶ added in v0.8.0
type DBContextMockiterateResult struct {
// contains filtered or unexported fields
}
type DBContextMocksetExpectation ¶ added in v0.8.0
type DBContextMocksetExpectation struct {
// contains filtered or unexported fields
}
func (*DBContextMocksetExpectation) Return ¶ added in v0.8.0
func (e *DBContextMocksetExpectation) Return(r error)
type DBContextMocksetInput ¶ added in v0.8.0
type DBContextMocksetInput struct {
// contains filtered or unexported fields
}
type DBContextMocksetResult ¶ added in v0.8.0
type DBContextMocksetResult struct {
// contains filtered or unexported fields
}
type DBContextMockwaitingFlightExpectation ¶ added in v0.8.0
type DBContextMockwaitingFlightExpectation struct { }
type DropStorage ¶ added in v0.8.0
type DropStorage interface { CreateDrop(ctx context.Context, jetID core.RecordID, pulse core.PulseNumber, prevHash []byte) ( *jet.JetDrop, [][]byte, uint64, error, ) SetDrop(ctx context.Context, jetID core.RecordID, drop *jet.JetDrop) error GetDrop(ctx context.Context, jetID core.RecordID, pulse core.PulseNumber) (*jet.JetDrop, error) AddDropSize(ctx context.Context, dropSize *jet.DropSize) error SetDropSizeHistory(ctx context.Context, jetID core.RecordID, dropSizeHistory jet.DropSizeHistory) error GetDropSizeHistory(ctx context.Context, jetID core.RecordID) (jet.DropSizeHistory, error) GetJetSizesHistoryDepth() int }
DropStorage jet-drops
func NewDropStorage ¶ added in v0.8.0
func NewDropStorage(jetSizesHistoryDepth int) DropStorage
type DropStorageMock ¶ added in v0.8.0
type DropStorageMock struct { AddDropSizeFunc func(p context.Context, p1 *jet.DropSize) (r error) AddDropSizeCounter uint64 AddDropSizePreCounter uint64 AddDropSizeMock mDropStorageMockAddDropSize CreateDropFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 []byte) (r *jet.JetDrop, r1 [][]byte, r2 uint64, r3 error) CreateDropCounter uint64 CreateDropPreCounter uint64 CreateDropMock mDropStorageMockCreateDrop GetDropFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r *jet.JetDrop, r1 error) GetDropCounter uint64 GetDropPreCounter uint64 GetDropMock mDropStorageMockGetDrop GetDropSizeHistoryFunc func(p context.Context, p1 core.RecordID) (r jet.DropSizeHistory, r1 error) GetDropSizeHistoryCounter uint64 GetDropSizeHistoryPreCounter uint64 GetDropSizeHistoryMock mDropStorageMockGetDropSizeHistory GetJetSizesHistoryDepthFunc func() (r int) GetJetSizesHistoryDepthCounter uint64 GetJetSizesHistoryDepthPreCounter uint64 GetJetSizesHistoryDepthMock mDropStorageMockGetJetSizesHistoryDepth SetDropFunc func(p context.Context, p1 core.RecordID, p2 *jet.JetDrop) (r error) SetDropCounter uint64 SetDropPreCounter uint64 SetDropMock mDropStorageMockSetDrop SetDropSizeHistoryFunc func(p context.Context, p1 core.RecordID, p2 jet.DropSizeHistory) (r error) SetDropSizeHistoryCounter uint64 SetDropSizeHistoryPreCounter uint64 SetDropSizeHistoryMock mDropStorageMockSetDropSizeHistory // contains filtered or unexported fields }
DropStorageMock implements github.com/insolar/insolar/ledger/storage.DropStorage
func NewDropStorageMock ¶ added in v0.8.0
func NewDropStorageMock(t minimock.Tester) *DropStorageMock
NewDropStorageMock returns a mock for github.com/insolar/insolar/ledger/storage.DropStorage
func (*DropStorageMock) AddDropSize ¶ added in v0.8.0
AddDropSize implements github.com/insolar/insolar/ledger/storage.DropStorage interface
func (*DropStorageMock) AddDropSizeFinished ¶ added in v0.8.0
func (m *DropStorageMock) AddDropSizeFinished() bool
AddDropSizeFinished returns true if mock invocations count is ok
func (*DropStorageMock) AddDropSizeMinimockCounter ¶ added in v0.8.0
func (m *DropStorageMock) AddDropSizeMinimockCounter() uint64
AddDropSizeMinimockCounter returns a count of DropStorageMock.AddDropSizeFunc invocations
func (*DropStorageMock) AddDropSizeMinimockPreCounter ¶ added in v0.8.0
func (m *DropStorageMock) AddDropSizeMinimockPreCounter() uint64
AddDropSizeMinimockPreCounter returns the value of DropStorageMock.AddDropSize invocations
func (*DropStorageMock) AllMocksCalled ¶ added in v0.8.0
func (m *DropStorageMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*DropStorageMock) CheckMocksCalled ¶ added in v0.8.0
func (m *DropStorageMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*DropStorageMock) CreateDrop ¶ added in v0.8.0
func (m *DropStorageMock) CreateDrop(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 []byte) (r *jet.JetDrop, r1 [][]byte, r2 uint64, r3 error)
CreateDrop implements github.com/insolar/insolar/ledger/storage.DropStorage interface
func (*DropStorageMock) CreateDropFinished ¶ added in v0.8.0
func (m *DropStorageMock) CreateDropFinished() bool
CreateDropFinished returns true if mock invocations count is ok
func (*DropStorageMock) CreateDropMinimockCounter ¶ added in v0.8.0
func (m *DropStorageMock) CreateDropMinimockCounter() uint64
CreateDropMinimockCounter returns a count of DropStorageMock.CreateDropFunc invocations
func (*DropStorageMock) CreateDropMinimockPreCounter ¶ added in v0.8.0
func (m *DropStorageMock) CreateDropMinimockPreCounter() uint64
CreateDropMinimockPreCounter returns the value of DropStorageMock.CreateDrop invocations
func (*DropStorageMock) Finish ¶ added in v0.8.0
func (m *DropStorageMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*DropStorageMock) GetDrop ¶ added in v0.8.0
func (m *DropStorageMock) GetDrop(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r *jet.JetDrop, r1 error)
GetDrop implements github.com/insolar/insolar/ledger/storage.DropStorage interface
func (*DropStorageMock) GetDropFinished ¶ added in v0.8.0
func (m *DropStorageMock) GetDropFinished() bool
GetDropFinished returns true if mock invocations count is ok
func (*DropStorageMock) GetDropMinimockCounter ¶ added in v0.8.0
func (m *DropStorageMock) GetDropMinimockCounter() uint64
GetDropMinimockCounter returns a count of DropStorageMock.GetDropFunc invocations
func (*DropStorageMock) GetDropMinimockPreCounter ¶ added in v0.8.0
func (m *DropStorageMock) GetDropMinimockPreCounter() uint64
GetDropMinimockPreCounter returns the value of DropStorageMock.GetDrop invocations
func (*DropStorageMock) GetDropSizeHistory ¶ added in v0.8.0
func (m *DropStorageMock) GetDropSizeHistory(p context.Context, p1 core.RecordID) (r jet.DropSizeHistory, r1 error)
GetDropSizeHistory implements github.com/insolar/insolar/ledger/storage.DropStorage interface
func (*DropStorageMock) GetDropSizeHistoryFinished ¶ added in v0.8.0
func (m *DropStorageMock) GetDropSizeHistoryFinished() bool
GetDropSizeHistoryFinished returns true if mock invocations count is ok
func (*DropStorageMock) GetDropSizeHistoryMinimockCounter ¶ added in v0.8.0
func (m *DropStorageMock) GetDropSizeHistoryMinimockCounter() uint64
GetDropSizeHistoryMinimockCounter returns a count of DropStorageMock.GetDropSizeHistoryFunc invocations
func (*DropStorageMock) GetDropSizeHistoryMinimockPreCounter ¶ added in v0.8.0
func (m *DropStorageMock) GetDropSizeHistoryMinimockPreCounter() uint64
GetDropSizeHistoryMinimockPreCounter returns the value of DropStorageMock.GetDropSizeHistory invocations
func (*DropStorageMock) GetJetSizesHistoryDepth ¶ added in v0.8.0
func (m *DropStorageMock) GetJetSizesHistoryDepth() (r int)
GetJetSizesHistoryDepth implements github.com/insolar/insolar/ledger/storage.DropStorage interface
func (*DropStorageMock) GetJetSizesHistoryDepthFinished ¶ added in v0.8.0
func (m *DropStorageMock) GetJetSizesHistoryDepthFinished() bool
GetJetSizesHistoryDepthFinished returns true if mock invocations count is ok
func (*DropStorageMock) GetJetSizesHistoryDepthMinimockCounter ¶ added in v0.8.0
func (m *DropStorageMock) GetJetSizesHistoryDepthMinimockCounter() uint64
GetJetSizesHistoryDepthMinimockCounter returns a count of DropStorageMock.GetJetSizesHistoryDepthFunc invocations
func (*DropStorageMock) GetJetSizesHistoryDepthMinimockPreCounter ¶ added in v0.8.0
func (m *DropStorageMock) GetJetSizesHistoryDepthMinimockPreCounter() uint64
GetJetSizesHistoryDepthMinimockPreCounter returns the value of DropStorageMock.GetJetSizesHistoryDepth invocations
func (*DropStorageMock) MinimockFinish ¶ added in v0.8.0
func (m *DropStorageMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*DropStorageMock) MinimockWait ¶ added in v0.8.0
func (m *DropStorageMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*DropStorageMock) SetDrop ¶ added in v0.8.0
SetDrop implements github.com/insolar/insolar/ledger/storage.DropStorage interface
func (*DropStorageMock) SetDropFinished ¶ added in v0.8.0
func (m *DropStorageMock) SetDropFinished() bool
SetDropFinished returns true if mock invocations count is ok
func (*DropStorageMock) SetDropMinimockCounter ¶ added in v0.8.0
func (m *DropStorageMock) SetDropMinimockCounter() uint64
SetDropMinimockCounter returns a count of DropStorageMock.SetDropFunc invocations
func (*DropStorageMock) SetDropMinimockPreCounter ¶ added in v0.8.0
func (m *DropStorageMock) SetDropMinimockPreCounter() uint64
SetDropMinimockPreCounter returns the value of DropStorageMock.SetDrop invocations
func (*DropStorageMock) SetDropSizeHistory ¶ added in v0.8.0
func (m *DropStorageMock) SetDropSizeHistory(p context.Context, p1 core.RecordID, p2 jet.DropSizeHistory) (r error)
SetDropSizeHistory implements github.com/insolar/insolar/ledger/storage.DropStorage interface
func (*DropStorageMock) SetDropSizeHistoryFinished ¶ added in v0.8.0
func (m *DropStorageMock) SetDropSizeHistoryFinished() bool
SetDropSizeHistoryFinished returns true if mock invocations count is ok
func (*DropStorageMock) SetDropSizeHistoryMinimockCounter ¶ added in v0.8.0
func (m *DropStorageMock) SetDropSizeHistoryMinimockCounter() uint64
SetDropSizeHistoryMinimockCounter returns a count of DropStorageMock.SetDropSizeHistoryFunc invocations
func (*DropStorageMock) SetDropSizeHistoryMinimockPreCounter ¶ added in v0.8.0
func (m *DropStorageMock) SetDropSizeHistoryMinimockPreCounter() uint64
SetDropSizeHistoryMinimockPreCounter returns the value of DropStorageMock.SetDropSizeHistory invocations
func (*DropStorageMock) ValidateCallCounters ¶ added in v0.8.0
func (m *DropStorageMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*DropStorageMock) Wait ¶ added in v0.8.0
func (m *DropStorageMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type DropStorageMockAddDropSizeExpectation ¶ added in v0.8.0
type DropStorageMockAddDropSizeExpectation struct {
// contains filtered or unexported fields
}
func (*DropStorageMockAddDropSizeExpectation) Return ¶ added in v0.8.0
func (e *DropStorageMockAddDropSizeExpectation) Return(r error)
type DropStorageMockAddDropSizeInput ¶ added in v0.8.0
type DropStorageMockAddDropSizeInput struct {
// contains filtered or unexported fields
}
type DropStorageMockAddDropSizeResult ¶ added in v0.8.0
type DropStorageMockAddDropSizeResult struct {
// contains filtered or unexported fields
}
type DropStorageMockCreateDropExpectation ¶ added in v0.8.0
type DropStorageMockCreateDropExpectation struct {
// contains filtered or unexported fields
}
type DropStorageMockCreateDropInput ¶ added in v0.8.0
type DropStorageMockCreateDropInput struct {
// contains filtered or unexported fields
}
type DropStorageMockCreateDropResult ¶ added in v0.8.0
type DropStorageMockCreateDropResult struct {
// contains filtered or unexported fields
}
type DropStorageMockGetDropExpectation ¶ added in v0.8.0
type DropStorageMockGetDropExpectation struct {
// contains filtered or unexported fields
}
type DropStorageMockGetDropInput ¶ added in v0.8.0
type DropStorageMockGetDropInput struct {
// contains filtered or unexported fields
}
type DropStorageMockGetDropResult ¶ added in v0.8.0
type DropStorageMockGetDropResult struct {
// contains filtered or unexported fields
}
type DropStorageMockGetDropSizeHistoryExpectation ¶ added in v0.8.0
type DropStorageMockGetDropSizeHistoryExpectation struct {
// contains filtered or unexported fields
}
func (*DropStorageMockGetDropSizeHistoryExpectation) Return ¶ added in v0.8.0
func (e *DropStorageMockGetDropSizeHistoryExpectation) Return(r jet.DropSizeHistory, r1 error)
type DropStorageMockGetDropSizeHistoryInput ¶ added in v0.8.0
type DropStorageMockGetDropSizeHistoryInput struct {
// contains filtered or unexported fields
}
type DropStorageMockGetDropSizeHistoryResult ¶ added in v0.8.0
type DropStorageMockGetDropSizeHistoryResult struct {
// contains filtered or unexported fields
}
type DropStorageMockGetJetSizesHistoryDepthExpectation ¶ added in v0.8.0
type DropStorageMockGetJetSizesHistoryDepthExpectation struct {
// contains filtered or unexported fields
}
func (*DropStorageMockGetJetSizesHistoryDepthExpectation) Return ¶ added in v0.8.0
func (e *DropStorageMockGetJetSizesHistoryDepthExpectation) Return(r int)
type DropStorageMockGetJetSizesHistoryDepthResult ¶ added in v0.8.0
type DropStorageMockGetJetSizesHistoryDepthResult struct {
// contains filtered or unexported fields
}
type DropStorageMockSetDropExpectation ¶ added in v0.8.0
type DropStorageMockSetDropExpectation struct {
// contains filtered or unexported fields
}
func (*DropStorageMockSetDropExpectation) Return ¶ added in v0.8.0
func (e *DropStorageMockSetDropExpectation) Return(r error)
type DropStorageMockSetDropInput ¶ added in v0.8.0
type DropStorageMockSetDropInput struct {
// contains filtered or unexported fields
}
type DropStorageMockSetDropResult ¶ added in v0.8.0
type DropStorageMockSetDropResult struct {
// contains filtered or unexported fields
}
type DropStorageMockSetDropSizeHistoryExpectation ¶ added in v0.8.0
type DropStorageMockSetDropSizeHistoryExpectation struct {
// contains filtered or unexported fields
}
func (*DropStorageMockSetDropSizeHistoryExpectation) Return ¶ added in v0.8.0
func (e *DropStorageMockSetDropSizeHistoryExpectation) Return(r error)
type DropStorageMockSetDropSizeHistoryInput ¶ added in v0.8.0
type DropStorageMockSetDropSizeHistoryInput struct {
// contains filtered or unexported fields
}
type DropStorageMockSetDropSizeHistoryResult ¶ added in v0.8.0
type DropStorageMockSetDropSizeHistoryResult struct {
// contains filtered or unexported fields
}
type GenesisState ¶ added in v0.8.0
func NewGenesisInitializer ¶ added in v0.8.0
func NewGenesisInitializer() GenesisState
type IDLocker ¶ added in v0.6.0
type IDLocker struct {
// contains filtered or unexported fields
}
IDLocker provides Lock/Unlock methods per record ID.
TODO: for further optimization we could use sync.Pool for mutexes.
func NewIDLocker ¶ added in v0.6.0
func NewIDLocker() *IDLocker
NewIDLocker creates new initialized IDLocker.
type JetStorage ¶ added in v0.7.5
type JetStorage interface { UpdateJetTree(ctx context.Context, pulse core.PulseNumber, setActual bool, ids ...core.RecordID) FindJet(ctx context.Context, pulse core.PulseNumber, id core.RecordID) (*core.RecordID, bool) SplitJetTree(ctx context.Context, pulse core.PulseNumber, jetID core.RecordID) (*core.RecordID, *core.RecordID, error) CloneJetTree(ctx context.Context, from, to core.PulseNumber) *jet.Tree DeleteJetTree(ctx context.Context, pulse core.PulseNumber) AddJets(ctx context.Context, jetIDs ...core.RecordID) error GetJets(ctx context.Context) (jet.IDSet, error) }
JetStorage provides methods for working with jets
func NewJetStorage ¶ added in v0.8.0
func NewJetStorage() JetStorage
type JetStorageMock ¶ added in v0.7.5
type JetStorageMock struct { AddJetsFunc func(p context.Context, p1 ...core.RecordID) (r error) AddJetsCounter uint64 AddJetsPreCounter uint64 AddJetsMock mJetStorageMockAddJets CloneJetTreeFunc func(p context.Context, p1 core.PulseNumber, p2 core.PulseNumber) (r *jet.Tree) CloneJetTreeCounter uint64 CloneJetTreePreCounter uint64 CloneJetTreeMock mJetStorageMockCloneJetTree DeleteJetTreeFunc func(p context.Context, p1 core.PulseNumber) DeleteJetTreeCounter uint64 DeleteJetTreePreCounter uint64 DeleteJetTreeMock mJetStorageMockDeleteJetTree FindJetFunc func(p context.Context, p1 core.PulseNumber, p2 core.RecordID) (r *core.RecordID, r1 bool) FindJetCounter uint64 FindJetPreCounter uint64 FindJetMock mJetStorageMockFindJet GetJetsFunc func(p context.Context) (r jet.IDSet, r1 error) GetJetsCounter uint64 GetJetsPreCounter uint64 GetJetsMock mJetStorageMockGetJets SplitJetTreeFunc func(p context.Context, p1 core.PulseNumber, p2 core.RecordID) (r *core.RecordID, r1 *core.RecordID, r2 error) SplitJetTreeCounter uint64 SplitJetTreePreCounter uint64 SplitJetTreeMock mJetStorageMockSplitJetTree UpdateJetTreeFunc func(p context.Context, p1 core.PulseNumber, p2 bool, p3 ...core.RecordID) UpdateJetTreeCounter uint64 UpdateJetTreePreCounter uint64 UpdateJetTreeMock mJetStorageMockUpdateJetTree // contains filtered or unexported fields }
JetStorageMock implements github.com/insolar/insolar/ledger/storage.JetStorage
func NewJetStorageMock ¶ added in v0.7.5
func NewJetStorageMock(t minimock.Tester) *JetStorageMock
NewJetStorageMock returns a mock for github.com/insolar/insolar/ledger/storage.JetStorage
func (*JetStorageMock) AddJets ¶ added in v0.7.5
AddJets implements github.com/insolar/insolar/ledger/storage.JetStorage interface
func (*JetStorageMock) AddJetsFinished ¶ added in v0.7.5
func (m *JetStorageMock) AddJetsFinished() bool
AddJetsFinished returns true if mock invocations count is ok
func (*JetStorageMock) AddJetsMinimockCounter ¶ added in v0.7.5
func (m *JetStorageMock) AddJetsMinimockCounter() uint64
AddJetsMinimockCounter returns a count of JetStorageMock.AddJetsFunc invocations
func (*JetStorageMock) AddJetsMinimockPreCounter ¶ added in v0.7.5
func (m *JetStorageMock) AddJetsMinimockPreCounter() uint64
AddJetsMinimockPreCounter returns the value of JetStorageMock.AddJets invocations
func (*JetStorageMock) AllMocksCalled ¶ added in v0.7.5
func (m *JetStorageMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*JetStorageMock) CheckMocksCalled ¶ added in v0.7.5
func (m *JetStorageMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*JetStorageMock) CloneJetTree ¶ added in v0.7.5
func (m *JetStorageMock) CloneJetTree(p context.Context, p1 core.PulseNumber, p2 core.PulseNumber) (r *jet.Tree)
CloneJetTree implements github.com/insolar/insolar/ledger/storage.JetStorage interface
func (*JetStorageMock) CloneJetTreeFinished ¶ added in v0.7.5
func (m *JetStorageMock) CloneJetTreeFinished() bool
CloneJetTreeFinished returns true if mock invocations count is ok
func (*JetStorageMock) CloneJetTreeMinimockCounter ¶ added in v0.7.5
func (m *JetStorageMock) CloneJetTreeMinimockCounter() uint64
CloneJetTreeMinimockCounter returns a count of JetStorageMock.CloneJetTreeFunc invocations
func (*JetStorageMock) CloneJetTreeMinimockPreCounter ¶ added in v0.7.5
func (m *JetStorageMock) CloneJetTreeMinimockPreCounter() uint64
CloneJetTreeMinimockPreCounter returns the value of JetStorageMock.CloneJetTree invocations
func (*JetStorageMock) DeleteJetTree ¶ added in v0.8.0
func (m *JetStorageMock) DeleteJetTree(p context.Context, p1 core.PulseNumber)
DeleteJetTree implements github.com/insolar/insolar/ledger/storage.JetStorage interface
func (*JetStorageMock) DeleteJetTreeFinished ¶ added in v0.8.0
func (m *JetStorageMock) DeleteJetTreeFinished() bool
DeleteJetTreeFinished returns true if mock invocations count is ok
func (*JetStorageMock) DeleteJetTreeMinimockCounter ¶ added in v0.8.0
func (m *JetStorageMock) DeleteJetTreeMinimockCounter() uint64
DeleteJetTreeMinimockCounter returns a count of JetStorageMock.DeleteJetTreeFunc invocations
func (*JetStorageMock) DeleteJetTreeMinimockPreCounter ¶ added in v0.8.0
func (m *JetStorageMock) DeleteJetTreeMinimockPreCounter() uint64
DeleteJetTreeMinimockPreCounter returns the value of JetStorageMock.DeleteJetTree invocations
func (*JetStorageMock) FindJet ¶ added in v0.8.0
func (m *JetStorageMock) FindJet(p context.Context, p1 core.PulseNumber, p2 core.RecordID) (r *core.RecordID, r1 bool)
FindJet implements github.com/insolar/insolar/ledger/storage.JetStorage interface
func (*JetStorageMock) FindJetFinished ¶ added in v0.8.0
func (m *JetStorageMock) FindJetFinished() bool
FindJetFinished returns true if mock invocations count is ok
func (*JetStorageMock) FindJetMinimockCounter ¶ added in v0.8.0
func (m *JetStorageMock) FindJetMinimockCounter() uint64
FindJetMinimockCounter returns a count of JetStorageMock.FindJetFunc invocations
func (*JetStorageMock) FindJetMinimockPreCounter ¶ added in v0.8.0
func (m *JetStorageMock) FindJetMinimockPreCounter() uint64
FindJetMinimockPreCounter returns the value of JetStorageMock.FindJet invocations
func (*JetStorageMock) Finish ¶ added in v0.7.5
func (m *JetStorageMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*JetStorageMock) GetJets ¶ added in v0.7.5
GetJets implements github.com/insolar/insolar/ledger/storage.JetStorage interface
func (*JetStorageMock) GetJetsFinished ¶ added in v0.7.5
func (m *JetStorageMock) GetJetsFinished() bool
GetJetsFinished returns true if mock invocations count is ok
func (*JetStorageMock) GetJetsMinimockCounter ¶ added in v0.7.5
func (m *JetStorageMock) GetJetsMinimockCounter() uint64
GetJetsMinimockCounter returns a count of JetStorageMock.GetJetsFunc invocations
func (*JetStorageMock) GetJetsMinimockPreCounter ¶ added in v0.7.5
func (m *JetStorageMock) GetJetsMinimockPreCounter() uint64
GetJetsMinimockPreCounter returns the value of JetStorageMock.GetJets invocations
func (*JetStorageMock) MinimockFinish ¶ added in v0.7.5
func (m *JetStorageMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*JetStorageMock) MinimockWait ¶ added in v0.7.5
func (m *JetStorageMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*JetStorageMock) SplitJetTree ¶ added in v0.7.5
func (m *JetStorageMock) SplitJetTree(p context.Context, p1 core.PulseNumber, p2 core.RecordID) (r *core.RecordID, r1 *core.RecordID, r2 error)
SplitJetTree implements github.com/insolar/insolar/ledger/storage.JetStorage interface
func (*JetStorageMock) SplitJetTreeFinished ¶ added in v0.7.5
func (m *JetStorageMock) SplitJetTreeFinished() bool
SplitJetTreeFinished returns true if mock invocations count is ok
func (*JetStorageMock) SplitJetTreeMinimockCounter ¶ added in v0.7.5
func (m *JetStorageMock) SplitJetTreeMinimockCounter() uint64
SplitJetTreeMinimockCounter returns a count of JetStorageMock.SplitJetTreeFunc invocations
func (*JetStorageMock) SplitJetTreeMinimockPreCounter ¶ added in v0.7.5
func (m *JetStorageMock) SplitJetTreeMinimockPreCounter() uint64
SplitJetTreeMinimockPreCounter returns the value of JetStorageMock.SplitJetTree invocations
func (*JetStorageMock) UpdateJetTree ¶ added in v0.7.5
func (m *JetStorageMock) UpdateJetTree(p context.Context, p1 core.PulseNumber, p2 bool, p3 ...core.RecordID)
UpdateJetTree implements github.com/insolar/insolar/ledger/storage.JetStorage interface
func (*JetStorageMock) UpdateJetTreeFinished ¶ added in v0.7.5
func (m *JetStorageMock) UpdateJetTreeFinished() bool
UpdateJetTreeFinished returns true if mock invocations count is ok
func (*JetStorageMock) UpdateJetTreeMinimockCounter ¶ added in v0.7.5
func (m *JetStorageMock) UpdateJetTreeMinimockCounter() uint64
UpdateJetTreeMinimockCounter returns a count of JetStorageMock.UpdateJetTreeFunc invocations
func (*JetStorageMock) UpdateJetTreeMinimockPreCounter ¶ added in v0.7.5
func (m *JetStorageMock) UpdateJetTreeMinimockPreCounter() uint64
UpdateJetTreeMinimockPreCounter returns the value of JetStorageMock.UpdateJetTree invocations
func (*JetStorageMock) ValidateCallCounters ¶ added in v0.7.5
func (m *JetStorageMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*JetStorageMock) Wait ¶ added in v0.7.5
func (m *JetStorageMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type JetStorageMockAddJetsExpectation ¶ added in v0.7.5
type JetStorageMockAddJetsExpectation struct {
// contains filtered or unexported fields
}
func (*JetStorageMockAddJetsExpectation) Return ¶ added in v0.7.5
func (e *JetStorageMockAddJetsExpectation) Return(r error)
type JetStorageMockAddJetsInput ¶ added in v0.7.5
type JetStorageMockAddJetsInput struct {
// contains filtered or unexported fields
}
type JetStorageMockAddJetsResult ¶ added in v0.7.5
type JetStorageMockAddJetsResult struct {
// contains filtered or unexported fields
}
type JetStorageMockCloneJetTreeExpectation ¶ added in v0.7.5
type JetStorageMockCloneJetTreeExpectation struct {
// contains filtered or unexported fields
}
func (*JetStorageMockCloneJetTreeExpectation) Return ¶ added in v0.7.5
func (e *JetStorageMockCloneJetTreeExpectation) Return(r *jet.Tree)
type JetStorageMockCloneJetTreeInput ¶ added in v0.7.5
type JetStorageMockCloneJetTreeInput struct {
// contains filtered or unexported fields
}
type JetStorageMockCloneJetTreeResult ¶ added in v0.7.5
type JetStorageMockCloneJetTreeResult struct {
// contains filtered or unexported fields
}
type JetStorageMockDeleteJetTreeExpectation ¶ added in v0.8.0
type JetStorageMockDeleteJetTreeExpectation struct {
// contains filtered or unexported fields
}
type JetStorageMockDeleteJetTreeInput ¶ added in v0.8.0
type JetStorageMockDeleteJetTreeInput struct {
// contains filtered or unexported fields
}
type JetStorageMockFindJetExpectation ¶ added in v0.8.0
type JetStorageMockFindJetExpectation struct {
// contains filtered or unexported fields
}
type JetStorageMockFindJetInput ¶ added in v0.8.0
type JetStorageMockFindJetInput struct {
// contains filtered or unexported fields
}
type JetStorageMockFindJetResult ¶ added in v0.8.0
type JetStorageMockFindJetResult struct {
// contains filtered or unexported fields
}
type JetStorageMockGetJetsExpectation ¶ added in v0.7.5
type JetStorageMockGetJetsExpectation struct {
// contains filtered or unexported fields
}
type JetStorageMockGetJetsInput ¶ added in v0.7.5
type JetStorageMockGetJetsInput struct {
// contains filtered or unexported fields
}
type JetStorageMockGetJetsResult ¶ added in v0.7.5
type JetStorageMockGetJetsResult struct {
// contains filtered or unexported fields
}
type JetStorageMockSplitJetTreeExpectation ¶ added in v0.7.5
type JetStorageMockSplitJetTreeExpectation struct {
// contains filtered or unexported fields
}
type JetStorageMockSplitJetTreeInput ¶ added in v0.7.5
type JetStorageMockSplitJetTreeInput struct {
// contains filtered or unexported fields
}
type JetStorageMockSplitJetTreeResult ¶ added in v0.7.5
type JetStorageMockSplitJetTreeResult struct {
// contains filtered or unexported fields
}
type JetStorageMockUpdateJetTreeExpectation ¶ added in v0.7.5
type JetStorageMockUpdateJetTreeExpectation struct {
// contains filtered or unexported fields
}
type JetStorageMockUpdateJetTreeInput ¶ added in v0.7.5
type JetStorageMockUpdateJetTreeInput struct {
// contains filtered or unexported fields
}
type Key ¶ added in v0.7.5
type Key []byte
Key type for wrapping storage binary key.
func (Key) PulseNumber ¶ added in v0.7.5
func (b Key) PulseNumber() core.PulseNumber
PulseNumber returns pulse number for provided storage binary key.
type Node ¶ added in v0.7.5
type Node struct { FID core.RecordRef FRole core.StaticRole }
func (Node) ConsensusAddress ¶ added in v0.8.0
func (Node) GetGlobuleID ¶ added in v0.7.5
func (Node) LeavingETA ¶ added in v0.8.0
func (Node) LeavingETA() core.PulseNumber
func (Node) Role ¶ added in v0.7.5
func (n Node) Role() core.StaticRole
func (Node) ShortID ¶ added in v0.7.5
func (Node) ShortID() core.ShortNodeID
type NodeStorage ¶ added in v0.8.0
type NodeStorage interface { SetActiveNodes(pulse core.PulseNumber, nodes []core.Node) error GetActiveNodes(pulse core.PulseNumber) ([]core.Node, error) GetActiveNodesByRole(pulse core.PulseNumber, role core.StaticRole) ([]core.Node, error) RemoveActiveNodesUntil(pulse core.PulseNumber) }
NodeStorage provides info about active nodes
func NewNodeStorage ¶ added in v0.8.0
func NewNodeStorage() NodeStorage
NewNodeStorage create new instance of NodeStorage
type NodeStorageMock ¶ added in v0.8.0
type NodeStorageMock struct { GetActiveNodesFunc func(p core.PulseNumber) (r []core.Node, r1 error) GetActiveNodesCounter uint64 GetActiveNodesPreCounter uint64 GetActiveNodesMock mNodeStorageMockGetActiveNodes GetActiveNodesByRoleFunc func(p core.PulseNumber, p1 core.StaticRole) (r []core.Node, r1 error) GetActiveNodesByRoleCounter uint64 GetActiveNodesByRolePreCounter uint64 GetActiveNodesByRoleMock mNodeStorageMockGetActiveNodesByRole RemoveActiveNodesUntilFunc func(p core.PulseNumber) RemoveActiveNodesUntilCounter uint64 RemoveActiveNodesUntilPreCounter uint64 RemoveActiveNodesUntilMock mNodeStorageMockRemoveActiveNodesUntil SetActiveNodesFunc func(p core.PulseNumber, p1 []core.Node) (r error) SetActiveNodesCounter uint64 SetActiveNodesPreCounter uint64 SetActiveNodesMock mNodeStorageMockSetActiveNodes // contains filtered or unexported fields }
NodeStorageMock implements github.com/insolar/insolar/ledger/storage.NodeStorage
func NewNodeStorageMock ¶ added in v0.8.0
func NewNodeStorageMock(t minimock.Tester) *NodeStorageMock
NewNodeStorageMock returns a mock for github.com/insolar/insolar/ledger/storage.NodeStorage
func (*NodeStorageMock) AllMocksCalled ¶ added in v0.8.0
func (m *NodeStorageMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*NodeStorageMock) CheckMocksCalled ¶ added in v0.8.0
func (m *NodeStorageMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*NodeStorageMock) Finish ¶ added in v0.8.0
func (m *NodeStorageMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*NodeStorageMock) GetActiveNodes ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodes(p core.PulseNumber) (r []core.Node, r1 error)
GetActiveNodes implements github.com/insolar/insolar/ledger/storage.NodeStorage interface
func (*NodeStorageMock) GetActiveNodesByRole ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodesByRole(p core.PulseNumber, p1 core.StaticRole) (r []core.Node, r1 error)
GetActiveNodesByRole implements github.com/insolar/insolar/ledger/storage.NodeStorage interface
func (*NodeStorageMock) GetActiveNodesByRoleFinished ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodesByRoleFinished() bool
GetActiveNodesByRoleFinished returns true if mock invocations count is ok
func (*NodeStorageMock) GetActiveNodesByRoleMinimockCounter ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodesByRoleMinimockCounter() uint64
GetActiveNodesByRoleMinimockCounter returns a count of NodeStorageMock.GetActiveNodesByRoleFunc invocations
func (*NodeStorageMock) GetActiveNodesByRoleMinimockPreCounter ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodesByRoleMinimockPreCounter() uint64
GetActiveNodesByRoleMinimockPreCounter returns the value of NodeStorageMock.GetActiveNodesByRole invocations
func (*NodeStorageMock) GetActiveNodesFinished ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodesFinished() bool
GetActiveNodesFinished returns true if mock invocations count is ok
func (*NodeStorageMock) GetActiveNodesMinimockCounter ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodesMinimockCounter() uint64
GetActiveNodesMinimockCounter returns a count of NodeStorageMock.GetActiveNodesFunc invocations
func (*NodeStorageMock) GetActiveNodesMinimockPreCounter ¶ added in v0.8.0
func (m *NodeStorageMock) GetActiveNodesMinimockPreCounter() uint64
GetActiveNodesMinimockPreCounter returns the value of NodeStorageMock.GetActiveNodes invocations
func (*NodeStorageMock) MinimockFinish ¶ added in v0.8.0
func (m *NodeStorageMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*NodeStorageMock) MinimockWait ¶ added in v0.8.0
func (m *NodeStorageMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*NodeStorageMock) RemoveActiveNodesUntil ¶ added in v0.8.0
func (m *NodeStorageMock) RemoveActiveNodesUntil(p core.PulseNumber)
RemoveActiveNodesUntil implements github.com/insolar/insolar/ledger/storage.NodeStorage interface
func (*NodeStorageMock) RemoveActiveNodesUntilFinished ¶ added in v0.8.0
func (m *NodeStorageMock) RemoveActiveNodesUntilFinished() bool
RemoveActiveNodesUntilFinished returns true if mock invocations count is ok
func (*NodeStorageMock) RemoveActiveNodesUntilMinimockCounter ¶ added in v0.8.0
func (m *NodeStorageMock) RemoveActiveNodesUntilMinimockCounter() uint64
RemoveActiveNodesUntilMinimockCounter returns a count of NodeStorageMock.RemoveActiveNodesUntilFunc invocations
func (*NodeStorageMock) RemoveActiveNodesUntilMinimockPreCounter ¶ added in v0.8.0
func (m *NodeStorageMock) RemoveActiveNodesUntilMinimockPreCounter() uint64
RemoveActiveNodesUntilMinimockPreCounter returns the value of NodeStorageMock.RemoveActiveNodesUntil invocations
func (*NodeStorageMock) SetActiveNodes ¶ added in v0.8.0
func (m *NodeStorageMock) SetActiveNodes(p core.PulseNumber, p1 []core.Node) (r error)
SetActiveNodes implements github.com/insolar/insolar/ledger/storage.NodeStorage interface
func (*NodeStorageMock) SetActiveNodesFinished ¶ added in v0.8.0
func (m *NodeStorageMock) SetActiveNodesFinished() bool
SetActiveNodesFinished returns true if mock invocations count is ok
func (*NodeStorageMock) SetActiveNodesMinimockCounter ¶ added in v0.8.0
func (m *NodeStorageMock) SetActiveNodesMinimockCounter() uint64
SetActiveNodesMinimockCounter returns a count of NodeStorageMock.SetActiveNodesFunc invocations
func (*NodeStorageMock) SetActiveNodesMinimockPreCounter ¶ added in v0.8.0
func (m *NodeStorageMock) SetActiveNodesMinimockPreCounter() uint64
SetActiveNodesMinimockPreCounter returns the value of NodeStorageMock.SetActiveNodes invocations
func (*NodeStorageMock) ValidateCallCounters ¶ added in v0.8.0
func (m *NodeStorageMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*NodeStorageMock) Wait ¶ added in v0.8.0
func (m *NodeStorageMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type NodeStorageMockGetActiveNodesByRoleExpectation ¶ added in v0.8.0
type NodeStorageMockGetActiveNodesByRoleExpectation struct {
// contains filtered or unexported fields
}
type NodeStorageMockGetActiveNodesByRoleInput ¶ added in v0.8.0
type NodeStorageMockGetActiveNodesByRoleInput struct {
// contains filtered or unexported fields
}
type NodeStorageMockGetActiveNodesByRoleResult ¶ added in v0.8.0
type NodeStorageMockGetActiveNodesByRoleResult struct {
// contains filtered or unexported fields
}
type NodeStorageMockGetActiveNodesExpectation ¶ added in v0.8.0
type NodeStorageMockGetActiveNodesExpectation struct {
// contains filtered or unexported fields
}
type NodeStorageMockGetActiveNodesInput ¶ added in v0.8.0
type NodeStorageMockGetActiveNodesInput struct {
// contains filtered or unexported fields
}
type NodeStorageMockGetActiveNodesResult ¶ added in v0.8.0
type NodeStorageMockGetActiveNodesResult struct {
// contains filtered or unexported fields
}
type NodeStorageMockRemoveActiveNodesUntilExpectation ¶ added in v0.8.0
type NodeStorageMockRemoveActiveNodesUntilExpectation struct {
// contains filtered or unexported fields
}
type NodeStorageMockRemoveActiveNodesUntilInput ¶ added in v0.8.0
type NodeStorageMockRemoveActiveNodesUntilInput struct {
// contains filtered or unexported fields
}
type NodeStorageMockSetActiveNodesExpectation ¶ added in v0.8.0
type NodeStorageMockSetActiveNodesExpectation struct {
// contains filtered or unexported fields
}
func (*NodeStorageMockSetActiveNodesExpectation) Return ¶ added in v0.8.0
func (e *NodeStorageMockSetActiveNodesExpectation) Return(r error)
type NodeStorageMockSetActiveNodesInput ¶ added in v0.8.0
type NodeStorageMockSetActiveNodesInput struct {
// contains filtered or unexported fields
}
type NodeStorageMockSetActiveNodesResult ¶ added in v0.8.0
type NodeStorageMockSetActiveNodesResult struct {
// contains filtered or unexported fields
}
type ObjectStorage ¶ added in v0.7.5
type ObjectStorage interface { GetBlob(ctx context.Context, jetID core.RecordID, id *core.RecordID) ([]byte, error) SetBlob(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, blob []byte) (*core.RecordID, error) GetRecord(ctx context.Context, jetID core.RecordID, id *core.RecordID) (record.Record, error) SetRecord(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, rec record.Record) (*core.RecordID, error) SetMessage(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, genericMessage core.Message) error IterateIndexIDs( ctx context.Context, jetID core.RecordID, handler func(id core.RecordID) error, ) error GetObjectIndex( ctx context.Context, jetID core.RecordID, id *core.RecordID, forupdate bool, ) (*index.ObjectLifeline, error) SetObjectIndex( ctx context.Context, jetID core.RecordID, id *core.RecordID, idx *index.ObjectLifeline, ) error RemoveObjectIndex( ctx context.Context, jetID core.RecordID, ref *core.RecordID, ) error }
ObjectStorage returns objects and their meta
func NewObjectStorage ¶ added in v0.8.0
func NewObjectStorage() ObjectStorage
type ObjectStorageMock ¶ added in v0.7.5
type ObjectStorageMock struct { GetBlobFunc func(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r []byte, r1 error) GetBlobCounter uint64 GetBlobPreCounter uint64 GetBlobMock mObjectStorageMockGetBlob GetObjectIndexFunc func(p context.Context, p1 core.RecordID, p2 *core.RecordID, p3 bool) (r *index.ObjectLifeline, r1 error) GetObjectIndexCounter uint64 GetObjectIndexPreCounter uint64 GetObjectIndexMock mObjectStorageMockGetObjectIndex GetRecordFunc func(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r record.Record, r1 error) GetRecordCounter uint64 GetRecordPreCounter uint64 GetRecordMock mObjectStorageMockGetRecord IterateIndexIDsFunc func(p context.Context, p1 core.RecordID, p2 func(p core.RecordID) (r error)) (r error) IterateIndexIDsCounter uint64 IterateIndexIDsPreCounter uint64 IterateIndexIDsMock mObjectStorageMockIterateIndexIDs RemoveObjectIndexFunc func(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r error) RemoveObjectIndexCounter uint64 RemoveObjectIndexPreCounter uint64 RemoveObjectIndexMock mObjectStorageMockRemoveObjectIndex SetBlobFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 []byte) (r *core.RecordID, r1 error) SetBlobCounter uint64 SetBlobPreCounter uint64 SetBlobMock mObjectStorageMockSetBlob SetMessageFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 core.Message) (r error) SetMessageCounter uint64 SetMessagePreCounter uint64 SetMessageMock mObjectStorageMockSetMessage SetObjectIndexFunc func(p context.Context, p1 core.RecordID, p2 *core.RecordID, p3 *index.ObjectLifeline) (r error) SetObjectIndexCounter uint64 SetObjectIndexPreCounter uint64 SetObjectIndexMock mObjectStorageMockSetObjectIndex SetRecordFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 record.Record) (r *core.RecordID, r1 error) SetRecordCounter uint64 SetRecordPreCounter uint64 SetRecordMock mObjectStorageMockSetRecord // contains filtered or unexported fields }
ObjectStorageMock implements github.com/insolar/insolar/ledger/storage.ObjectStorage
func NewObjectStorageMock ¶ added in v0.7.5
func NewObjectStorageMock(t minimock.Tester) *ObjectStorageMock
NewObjectStorageMock returns a mock for github.com/insolar/insolar/ledger/storage.ObjectStorage
func (*ObjectStorageMock) AllMocksCalled ¶ added in v0.7.5
func (m *ObjectStorageMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*ObjectStorageMock) CheckMocksCalled ¶ added in v0.7.5
func (m *ObjectStorageMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*ObjectStorageMock) Finish ¶ added in v0.7.5
func (m *ObjectStorageMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*ObjectStorageMock) GetBlob ¶ added in v0.7.5
func (m *ObjectStorageMock) GetBlob(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r []byte, r1 error)
GetBlob implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) GetBlobFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) GetBlobFinished() bool
GetBlobFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) GetBlobMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) GetBlobMinimockCounter() uint64
GetBlobMinimockCounter returns a count of ObjectStorageMock.GetBlobFunc invocations
func (*ObjectStorageMock) GetBlobMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) GetBlobMinimockPreCounter() uint64
GetBlobMinimockPreCounter returns the value of ObjectStorageMock.GetBlob invocations
func (*ObjectStorageMock) GetObjectIndex ¶ added in v0.7.5
func (m *ObjectStorageMock) GetObjectIndex(p context.Context, p1 core.RecordID, p2 *core.RecordID, p3 bool) (r *index.ObjectLifeline, r1 error)
GetObjectIndex implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) GetObjectIndexFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) GetObjectIndexFinished() bool
GetObjectIndexFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) GetObjectIndexMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) GetObjectIndexMinimockCounter() uint64
GetObjectIndexMinimockCounter returns a count of ObjectStorageMock.GetObjectIndexFunc invocations
func (*ObjectStorageMock) GetObjectIndexMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) GetObjectIndexMinimockPreCounter() uint64
GetObjectIndexMinimockPreCounter returns the value of ObjectStorageMock.GetObjectIndex invocations
func (*ObjectStorageMock) GetRecord ¶ added in v0.7.5
func (m *ObjectStorageMock) GetRecord(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r record.Record, r1 error)
GetRecord implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) GetRecordFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) GetRecordFinished() bool
GetRecordFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) GetRecordMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) GetRecordMinimockCounter() uint64
GetRecordMinimockCounter returns a count of ObjectStorageMock.GetRecordFunc invocations
func (*ObjectStorageMock) GetRecordMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) GetRecordMinimockPreCounter() uint64
GetRecordMinimockPreCounter returns the value of ObjectStorageMock.GetRecord invocations
func (*ObjectStorageMock) IterateIndexIDs ¶ added in v0.7.5
func (m *ObjectStorageMock) IterateIndexIDs(p context.Context, p1 core.RecordID, p2 func(p core.RecordID) (r error)) (r error)
IterateIndexIDs implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) IterateIndexIDsFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) IterateIndexIDsFinished() bool
IterateIndexIDsFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) IterateIndexIDsMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) IterateIndexIDsMinimockCounter() uint64
IterateIndexIDsMinimockCounter returns a count of ObjectStorageMock.IterateIndexIDsFunc invocations
func (*ObjectStorageMock) IterateIndexIDsMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) IterateIndexIDsMinimockPreCounter() uint64
IterateIndexIDsMinimockPreCounter returns the value of ObjectStorageMock.IterateIndexIDs invocations
func (*ObjectStorageMock) MinimockFinish ¶ added in v0.7.5
func (m *ObjectStorageMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*ObjectStorageMock) MinimockWait ¶ added in v0.7.5
func (m *ObjectStorageMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*ObjectStorageMock) RemoveObjectIndex ¶ added in v0.7.5
func (m *ObjectStorageMock) RemoveObjectIndex(p context.Context, p1 core.RecordID, p2 *core.RecordID) (r error)
RemoveObjectIndex implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) RemoveObjectIndexFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) RemoveObjectIndexFinished() bool
RemoveObjectIndexFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) RemoveObjectIndexMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) RemoveObjectIndexMinimockCounter() uint64
RemoveObjectIndexMinimockCounter returns a count of ObjectStorageMock.RemoveObjectIndexFunc invocations
func (*ObjectStorageMock) RemoveObjectIndexMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) RemoveObjectIndexMinimockPreCounter() uint64
RemoveObjectIndexMinimockPreCounter returns the value of ObjectStorageMock.RemoveObjectIndex invocations
func (*ObjectStorageMock) SetBlob ¶ added in v0.7.5
func (m *ObjectStorageMock) SetBlob(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 []byte) (r *core.RecordID, r1 error)
SetBlob implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) SetBlobFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) SetBlobFinished() bool
SetBlobFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) SetBlobMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetBlobMinimockCounter() uint64
SetBlobMinimockCounter returns a count of ObjectStorageMock.SetBlobFunc invocations
func (*ObjectStorageMock) SetBlobMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetBlobMinimockPreCounter() uint64
SetBlobMinimockPreCounter returns the value of ObjectStorageMock.SetBlob invocations
func (*ObjectStorageMock) SetMessage ¶ added in v0.7.5
func (m *ObjectStorageMock) SetMessage(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 core.Message) (r error)
SetMessage implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) SetMessageFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) SetMessageFinished() bool
SetMessageFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) SetMessageMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetMessageMinimockCounter() uint64
SetMessageMinimockCounter returns a count of ObjectStorageMock.SetMessageFunc invocations
func (*ObjectStorageMock) SetMessageMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetMessageMinimockPreCounter() uint64
SetMessageMinimockPreCounter returns the value of ObjectStorageMock.SetMessage invocations
func (*ObjectStorageMock) SetObjectIndex ¶ added in v0.7.5
func (m *ObjectStorageMock) SetObjectIndex(p context.Context, p1 core.RecordID, p2 *core.RecordID, p3 *index.ObjectLifeline) (r error)
SetObjectIndex implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) SetObjectIndexFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) SetObjectIndexFinished() bool
SetObjectIndexFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) SetObjectIndexMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetObjectIndexMinimockCounter() uint64
SetObjectIndexMinimockCounter returns a count of ObjectStorageMock.SetObjectIndexFunc invocations
func (*ObjectStorageMock) SetObjectIndexMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetObjectIndexMinimockPreCounter() uint64
SetObjectIndexMinimockPreCounter returns the value of ObjectStorageMock.SetObjectIndex invocations
func (*ObjectStorageMock) SetRecord ¶ added in v0.7.5
func (m *ObjectStorageMock) SetRecord(p context.Context, p1 core.RecordID, p2 core.PulseNumber, p3 record.Record) (r *core.RecordID, r1 error)
SetRecord implements github.com/insolar/insolar/ledger/storage.ObjectStorage interface
func (*ObjectStorageMock) SetRecordFinished ¶ added in v0.7.5
func (m *ObjectStorageMock) SetRecordFinished() bool
SetRecordFinished returns true if mock invocations count is ok
func (*ObjectStorageMock) SetRecordMinimockCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetRecordMinimockCounter() uint64
SetRecordMinimockCounter returns a count of ObjectStorageMock.SetRecordFunc invocations
func (*ObjectStorageMock) SetRecordMinimockPreCounter ¶ added in v0.7.5
func (m *ObjectStorageMock) SetRecordMinimockPreCounter() uint64
SetRecordMinimockPreCounter returns the value of ObjectStorageMock.SetRecord invocations
func (*ObjectStorageMock) ValidateCallCounters ¶ added in v0.7.5
func (m *ObjectStorageMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*ObjectStorageMock) Wait ¶ added in v0.7.5
func (m *ObjectStorageMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type ObjectStorageMockGetBlobExpectation ¶ added in v0.7.5
type ObjectStorageMockGetBlobExpectation struct {
// contains filtered or unexported fields
}
func (*ObjectStorageMockGetBlobExpectation) Return ¶ added in v0.7.5
func (e *ObjectStorageMockGetBlobExpectation) Return(r []byte, r1 error)
type ObjectStorageMockGetBlobInput ¶ added in v0.7.5
type ObjectStorageMockGetBlobInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockGetBlobResult ¶ added in v0.7.5
type ObjectStorageMockGetBlobResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockGetObjectIndexExpectation ¶ added in v0.7.5
type ObjectStorageMockGetObjectIndexExpectation struct {
// contains filtered or unexported fields
}
func (*ObjectStorageMockGetObjectIndexExpectation) Return ¶ added in v0.7.5
func (e *ObjectStorageMockGetObjectIndexExpectation) Return(r *index.ObjectLifeline, r1 error)
type ObjectStorageMockGetObjectIndexInput ¶ added in v0.7.5
type ObjectStorageMockGetObjectIndexInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockGetObjectIndexResult ¶ added in v0.7.5
type ObjectStorageMockGetObjectIndexResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockGetRecordExpectation ¶ added in v0.7.5
type ObjectStorageMockGetRecordExpectation struct {
// contains filtered or unexported fields
}
type ObjectStorageMockGetRecordInput ¶ added in v0.7.5
type ObjectStorageMockGetRecordInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockGetRecordResult ¶ added in v0.7.5
type ObjectStorageMockGetRecordResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockIterateIndexIDsExpectation ¶ added in v0.7.5
type ObjectStorageMockIterateIndexIDsExpectation struct {
// contains filtered or unexported fields
}
func (*ObjectStorageMockIterateIndexIDsExpectation) Return ¶ added in v0.7.5
func (e *ObjectStorageMockIterateIndexIDsExpectation) Return(r error)
type ObjectStorageMockIterateIndexIDsInput ¶ added in v0.7.5
type ObjectStorageMockIterateIndexIDsInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockIterateIndexIDsResult ¶ added in v0.7.5
type ObjectStorageMockIterateIndexIDsResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockRemoveObjectIndexExpectation ¶ added in v0.7.5
type ObjectStorageMockRemoveObjectIndexExpectation struct {
// contains filtered or unexported fields
}
func (*ObjectStorageMockRemoveObjectIndexExpectation) Return ¶ added in v0.7.5
func (e *ObjectStorageMockRemoveObjectIndexExpectation) Return(r error)
type ObjectStorageMockRemoveObjectIndexInput ¶ added in v0.7.5
type ObjectStorageMockRemoveObjectIndexInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockRemoveObjectIndexResult ¶ added in v0.7.5
type ObjectStorageMockRemoveObjectIndexResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetBlobExpectation ¶ added in v0.7.5
type ObjectStorageMockSetBlobExpectation struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetBlobInput ¶ added in v0.7.5
type ObjectStorageMockSetBlobInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetBlobResult ¶ added in v0.7.5
type ObjectStorageMockSetBlobResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetMessageExpectation ¶ added in v0.7.5
type ObjectStorageMockSetMessageExpectation struct {
// contains filtered or unexported fields
}
func (*ObjectStorageMockSetMessageExpectation) Return ¶ added in v0.7.5
func (e *ObjectStorageMockSetMessageExpectation) Return(r error)
type ObjectStorageMockSetMessageInput ¶ added in v0.7.5
type ObjectStorageMockSetMessageInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetMessageResult ¶ added in v0.7.5
type ObjectStorageMockSetMessageResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetObjectIndexExpectation ¶ added in v0.7.5
type ObjectStorageMockSetObjectIndexExpectation struct {
// contains filtered or unexported fields
}
func (*ObjectStorageMockSetObjectIndexExpectation) Return ¶ added in v0.7.5
func (e *ObjectStorageMockSetObjectIndexExpectation) Return(r error)
type ObjectStorageMockSetObjectIndexInput ¶ added in v0.7.5
type ObjectStorageMockSetObjectIndexInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetObjectIndexResult ¶ added in v0.7.5
type ObjectStorageMockSetObjectIndexResult struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetRecordExpectation ¶ added in v0.7.5
type ObjectStorageMockSetRecordExpectation struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetRecordInput ¶ added in v0.7.5
type ObjectStorageMockSetRecordInput struct {
// contains filtered or unexported fields
}
type ObjectStorageMockSetRecordResult ¶ added in v0.7.5
type ObjectStorageMockSetRecordResult struct {
// contains filtered or unexported fields
}
type Pulse ¶ added in v0.6.3
type Pulse struct { Prev *core.PulseNumber Next *core.PulseNumber SerialNumber int Pulse core.Pulse }
Pulse is a record containing pulse info.
type PulseStorage ¶ added in v0.7.5
type PulseStorage struct { PulseTracker PulseTracker `inject:""` // contains filtered or unexported fields }
PulseStorage implements core.PulseStorage
func NewPulseStorage ¶ added in v0.7.5
func NewPulseStorage() *PulseStorage
NewPulseStorage creates new pulse storage
func (*PulseStorage) Lock ¶ added in v0.7.5
func (ps *PulseStorage) Lock()
Lock takes lock on parent's pulse storage
func (*PulseStorage) Set ¶ added in v0.7.5
func (ps *PulseStorage) Set(pulse *core.Pulse)
func (*PulseStorage) Unlock ¶ added in v0.7.5
func (ps *PulseStorage) Unlock()
Unlock takes unlock on parent's pulse storage
type PulseTracker ¶ added in v0.7.5
type PulseTracker interface { GetPulse(ctx context.Context, num core.PulseNumber) (*Pulse, error) GetPreviousPulse(ctx context.Context, num core.PulseNumber) (*Pulse, error) GetNthPrevPulse(ctx context.Context, n uint, from core.PulseNumber) (*Pulse, error) GetLatestPulse(ctx context.Context) (*Pulse, error) AddPulse(ctx context.Context, pulse core.Pulse) error DeletePulse(ctx context.Context, num core.PulseNumber) error }
PulseTracker allows to modify state of the pulse inside storage (internal or external)
func NewPulseTracker ¶ added in v0.8.0
func NewPulseTracker() PulseTracker
NewPulseTracker returns new instance PulseTracker with DB-storage realization
func NewPulseTrackerMemory ¶ added in v0.8.0
func NewPulseTrackerMemory() PulseTracker
NewPulseTracker returns new instance PulseTracker with in-memory realization
type PulseTrackerMock ¶ added in v0.7.5
type PulseTrackerMock struct { AddPulseFunc func(p context.Context, p1 core.Pulse) (r error) AddPulseCounter uint64 AddPulsePreCounter uint64 AddPulseMock mPulseTrackerMockAddPulse DeletePulseFunc func(p context.Context, p1 core.PulseNumber) (r error) DeletePulseCounter uint64 DeletePulsePreCounter uint64 DeletePulseMock mPulseTrackerMockDeletePulse GetLatestPulseFunc func(p context.Context) (r *Pulse, r1 error) GetLatestPulseCounter uint64 GetLatestPulsePreCounter uint64 GetLatestPulseMock mPulseTrackerMockGetLatestPulse GetNthPrevPulseFunc func(p context.Context, p1 uint, p2 core.PulseNumber) (r *Pulse, r1 error) GetNthPrevPulseCounter uint64 GetNthPrevPulsePreCounter uint64 GetNthPrevPulseMock mPulseTrackerMockGetNthPrevPulse GetPreviousPulseFunc func(p context.Context, p1 core.PulseNumber) (r *Pulse, r1 error) GetPreviousPulseCounter uint64 GetPreviousPulsePreCounter uint64 GetPreviousPulseMock mPulseTrackerMockGetPreviousPulse GetPulseFunc func(p context.Context, p1 core.PulseNumber) (r *Pulse, r1 error) GetPulseCounter uint64 GetPulsePreCounter uint64 GetPulseMock mPulseTrackerMockGetPulse // contains filtered or unexported fields }
PulseTrackerMock implements github.com/insolar/insolar/ledger/storage.PulseTracker
func NewPulseTrackerMock ¶ added in v0.7.5
func NewPulseTrackerMock(t minimock.Tester) *PulseTrackerMock
NewPulseTrackerMock returns a mock for github.com/insolar/insolar/ledger/storage.PulseTracker
func (*PulseTrackerMock) AddPulse ¶ added in v0.7.5
AddPulse implements github.com/insolar/insolar/ledger/storage.PulseTracker interface
func (*PulseTrackerMock) AddPulseFinished ¶ added in v0.7.5
func (m *PulseTrackerMock) AddPulseFinished() bool
AddPulseFinished returns true if mock invocations count is ok
func (*PulseTrackerMock) AddPulseMinimockCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) AddPulseMinimockCounter() uint64
AddPulseMinimockCounter returns a count of PulseTrackerMock.AddPulseFunc invocations
func (*PulseTrackerMock) AddPulseMinimockPreCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) AddPulseMinimockPreCounter() uint64
AddPulseMinimockPreCounter returns the value of PulseTrackerMock.AddPulse invocations
func (*PulseTrackerMock) AllMocksCalled ¶ added in v0.7.5
func (m *PulseTrackerMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*PulseTrackerMock) CheckMocksCalled ¶ added in v0.7.5
func (m *PulseTrackerMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*PulseTrackerMock) DeletePulse ¶ added in v0.8.0
func (m *PulseTrackerMock) DeletePulse(p context.Context, p1 core.PulseNumber) (r error)
DeletePulse implements github.com/insolar/insolar/ledger/storage.PulseTracker interface
func (*PulseTrackerMock) DeletePulseFinished ¶ added in v0.8.0
func (m *PulseTrackerMock) DeletePulseFinished() bool
DeletePulseFinished returns true if mock invocations count is ok
func (*PulseTrackerMock) DeletePulseMinimockCounter ¶ added in v0.8.0
func (m *PulseTrackerMock) DeletePulseMinimockCounter() uint64
DeletePulseMinimockCounter returns a count of PulseTrackerMock.DeletePulseFunc invocations
func (*PulseTrackerMock) DeletePulseMinimockPreCounter ¶ added in v0.8.0
func (m *PulseTrackerMock) DeletePulseMinimockPreCounter() uint64
DeletePulseMinimockPreCounter returns the value of PulseTrackerMock.DeletePulse invocations
func (*PulseTrackerMock) Finish ¶ added in v0.7.5
func (m *PulseTrackerMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*PulseTrackerMock) GetLatestPulse ¶ added in v0.7.5
func (m *PulseTrackerMock) GetLatestPulse(p context.Context) (r *Pulse, r1 error)
GetLatestPulse implements github.com/insolar/insolar/ledger/storage.PulseTracker interface
func (*PulseTrackerMock) GetLatestPulseFinished ¶ added in v0.7.5
func (m *PulseTrackerMock) GetLatestPulseFinished() bool
GetLatestPulseFinished returns true if mock invocations count is ok
func (*PulseTrackerMock) GetLatestPulseMinimockCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) GetLatestPulseMinimockCounter() uint64
GetLatestPulseMinimockCounter returns a count of PulseTrackerMock.GetLatestPulseFunc invocations
func (*PulseTrackerMock) GetLatestPulseMinimockPreCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) GetLatestPulseMinimockPreCounter() uint64
GetLatestPulseMinimockPreCounter returns the value of PulseTrackerMock.GetLatestPulse invocations
func (*PulseTrackerMock) GetNthPrevPulse ¶ added in v0.8.0
func (m *PulseTrackerMock) GetNthPrevPulse(p context.Context, p1 uint, p2 core.PulseNumber) (r *Pulse, r1 error)
GetNthPrevPulse implements github.com/insolar/insolar/ledger/storage.PulseTracker interface
func (*PulseTrackerMock) GetNthPrevPulseFinished ¶ added in v0.8.0
func (m *PulseTrackerMock) GetNthPrevPulseFinished() bool
GetNthPrevPulseFinished returns true if mock invocations count is ok
func (*PulseTrackerMock) GetNthPrevPulseMinimockCounter ¶ added in v0.8.0
func (m *PulseTrackerMock) GetNthPrevPulseMinimockCounter() uint64
GetNthPrevPulseMinimockCounter returns a count of PulseTrackerMock.GetNthPrevPulseFunc invocations
func (*PulseTrackerMock) GetNthPrevPulseMinimockPreCounter ¶ added in v0.8.0
func (m *PulseTrackerMock) GetNthPrevPulseMinimockPreCounter() uint64
GetNthPrevPulseMinimockPreCounter returns the value of PulseTrackerMock.GetNthPrevPulse invocations
func (*PulseTrackerMock) GetPreviousPulse ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPreviousPulse(p context.Context, p1 core.PulseNumber) (r *Pulse, r1 error)
GetPreviousPulse implements github.com/insolar/insolar/ledger/storage.PulseTracker interface
func (*PulseTrackerMock) GetPreviousPulseFinished ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPreviousPulseFinished() bool
GetPreviousPulseFinished returns true if mock invocations count is ok
func (*PulseTrackerMock) GetPreviousPulseMinimockCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPreviousPulseMinimockCounter() uint64
GetPreviousPulseMinimockCounter returns a count of PulseTrackerMock.GetPreviousPulseFunc invocations
func (*PulseTrackerMock) GetPreviousPulseMinimockPreCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPreviousPulseMinimockPreCounter() uint64
GetPreviousPulseMinimockPreCounter returns the value of PulseTrackerMock.GetPreviousPulse invocations
func (*PulseTrackerMock) GetPulse ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPulse(p context.Context, p1 core.PulseNumber) (r *Pulse, r1 error)
GetPulse implements github.com/insolar/insolar/ledger/storage.PulseTracker interface
func (*PulseTrackerMock) GetPulseFinished ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPulseFinished() bool
GetPulseFinished returns true if mock invocations count is ok
func (*PulseTrackerMock) GetPulseMinimockCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPulseMinimockCounter() uint64
GetPulseMinimockCounter returns a count of PulseTrackerMock.GetPulseFunc invocations
func (*PulseTrackerMock) GetPulseMinimockPreCounter ¶ added in v0.7.5
func (m *PulseTrackerMock) GetPulseMinimockPreCounter() uint64
GetPulseMinimockPreCounter returns the value of PulseTrackerMock.GetPulse invocations
func (*PulseTrackerMock) MinimockFinish ¶ added in v0.7.5
func (m *PulseTrackerMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*PulseTrackerMock) MinimockWait ¶ added in v0.7.5
func (m *PulseTrackerMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*PulseTrackerMock) ValidateCallCounters ¶ added in v0.7.5
func (m *PulseTrackerMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*PulseTrackerMock) Wait ¶ added in v0.7.5
func (m *PulseTrackerMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type PulseTrackerMockAddPulseExpectation ¶ added in v0.7.5
type PulseTrackerMockAddPulseExpectation struct {
// contains filtered or unexported fields
}
func (*PulseTrackerMockAddPulseExpectation) Return ¶ added in v0.7.5
func (e *PulseTrackerMockAddPulseExpectation) Return(r error)
type PulseTrackerMockAddPulseInput ¶ added in v0.7.5
type PulseTrackerMockAddPulseInput struct {
// contains filtered or unexported fields
}
type PulseTrackerMockAddPulseResult ¶ added in v0.7.5
type PulseTrackerMockAddPulseResult struct {
// contains filtered or unexported fields
}
type PulseTrackerMockDeletePulseExpectation ¶ added in v0.8.0
type PulseTrackerMockDeletePulseExpectation struct {
// contains filtered or unexported fields
}
func (*PulseTrackerMockDeletePulseExpectation) Return ¶ added in v0.8.0
func (e *PulseTrackerMockDeletePulseExpectation) Return(r error)
type PulseTrackerMockDeletePulseInput ¶ added in v0.8.0
type PulseTrackerMockDeletePulseInput struct {
// contains filtered or unexported fields
}
type PulseTrackerMockDeletePulseResult ¶ added in v0.8.0
type PulseTrackerMockDeletePulseResult struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetLatestPulseExpectation ¶ added in v0.7.5
type PulseTrackerMockGetLatestPulseExpectation struct {
// contains filtered or unexported fields
}
func (*PulseTrackerMockGetLatestPulseExpectation) Return ¶ added in v0.7.5
func (e *PulseTrackerMockGetLatestPulseExpectation) Return(r *Pulse, r1 error)
type PulseTrackerMockGetLatestPulseInput ¶ added in v0.7.5
type PulseTrackerMockGetLatestPulseInput struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetLatestPulseResult ¶ added in v0.7.5
type PulseTrackerMockGetLatestPulseResult struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetNthPrevPulseExpectation ¶ added in v0.8.0
type PulseTrackerMockGetNthPrevPulseExpectation struct {
// contains filtered or unexported fields
}
func (*PulseTrackerMockGetNthPrevPulseExpectation) Return ¶ added in v0.8.0
func (e *PulseTrackerMockGetNthPrevPulseExpectation) Return(r *Pulse, r1 error)
type PulseTrackerMockGetNthPrevPulseInput ¶ added in v0.8.0
type PulseTrackerMockGetNthPrevPulseInput struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetNthPrevPulseResult ¶ added in v0.8.0
type PulseTrackerMockGetNthPrevPulseResult struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetPreviousPulseExpectation ¶ added in v0.7.5
type PulseTrackerMockGetPreviousPulseExpectation struct {
// contains filtered or unexported fields
}
func (*PulseTrackerMockGetPreviousPulseExpectation) Return ¶ added in v0.7.5
func (e *PulseTrackerMockGetPreviousPulseExpectation) Return(r *Pulse, r1 error)
type PulseTrackerMockGetPreviousPulseInput ¶ added in v0.7.5
type PulseTrackerMockGetPreviousPulseInput struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetPreviousPulseResult ¶ added in v0.7.5
type PulseTrackerMockGetPreviousPulseResult struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetPulseExpectation ¶ added in v0.7.5
type PulseTrackerMockGetPulseExpectation struct {
// contains filtered or unexported fields
}
func (*PulseTrackerMockGetPulseExpectation) Return ¶ added in v0.7.5
func (e *PulseTrackerMockGetPulseExpectation) Return(r *Pulse, r1 error)
type PulseTrackerMockGetPulseInput ¶ added in v0.7.5
type PulseTrackerMockGetPulseInput struct {
// contains filtered or unexported fields
}
type PulseTrackerMockGetPulseResult ¶ added in v0.7.5
type PulseTrackerMockGetPulseResult struct {
// contains filtered or unexported fields
}
type ReplicaIter ¶ added in v0.6.3
type ReplicaIter struct {
// contains filtered or unexported fields
}
ReplicaIter provides partial iterator over BadgerDB key/value pairs required for replication to Heavy Material node in provided pulses range.
"Required KV pairs" are all keys with namespace 'scopeIDRecord' (TODO: 'add scopeIDBlob') in provided pulses range and all indexes from zero pulse to the end of provided range.
"Partial" means it fetches data in chunks of the specified size. After a chunk has been fetched, an iterator saves current position.
NOTE: This is not an "honest" alogrithm, because the last record size can exceed the limit. Better implementation is for the future work.
func NewReplicaIter ¶ added in v0.6.3
func NewReplicaIter( ctx context.Context, dbContext DBContext, jetID core.RecordID, start core.PulseNumber, end core.PulseNumber, limit int, ) *ReplicaIter
NewReplicaIter creates ReplicaIter what iterates over records on jet, required for heavy material replication.
Params 'start' and 'end' defines pulses from which scan should happen, and on which it should be stopped, but indexes scan are always started from core.FirstPulseNumber.
Param 'limit' sets per message limit.
func (*ReplicaIter) LastSeenPulse ¶ added in v0.7.5
func (r *ReplicaIter) LastSeenPulse() core.PulseNumber
LastPulse returns maximum pulse number of returned keys after each fetch.
func (*ReplicaIter) NextRecords ¶ added in v0.6.3
func (r *ReplicaIter) NextRecords() ([]core.KV, error)
NextRecords fetches next part of key value pairs.
type ReplicaStorage ¶ added in v0.7.5
type ReplicaStorage interface { SetHeavySyncedPulse(ctx context.Context, jetID core.RecordID, pulsenum core.PulseNumber) error GetHeavySyncedPulse(ctx context.Context, jetID core.RecordID) (pn core.PulseNumber, err error) GetSyncClientJetPulses(ctx context.Context, jetID core.RecordID) ([]core.PulseNumber, error) SetSyncClientJetPulses(ctx context.Context, jetID core.RecordID, pns []core.PulseNumber) error GetAllSyncClientJets(ctx context.Context) (map[core.RecordID][]core.PulseNumber, error) GetAllNonEmptySyncClientJets(ctx context.Context) (map[core.RecordID][]core.PulseNumber, error) }
ReplicaStorage is a heavy-based storage
func NewReplicaStorage ¶ added in v0.8.0
func NewReplicaStorage() ReplicaStorage
type ReplicaStorageMock ¶ added in v0.7.5
type ReplicaStorageMock struct { GetAllNonEmptySyncClientJetsFunc func(p context.Context) (r map[core.RecordID][]core.PulseNumber, r1 error) GetAllNonEmptySyncClientJetsCounter uint64 GetAllNonEmptySyncClientJetsPreCounter uint64 GetAllNonEmptySyncClientJetsMock mReplicaStorageMockGetAllNonEmptySyncClientJets GetAllSyncClientJetsFunc func(p context.Context) (r map[core.RecordID][]core.PulseNumber, r1 error) GetAllSyncClientJetsCounter uint64 GetAllSyncClientJetsPreCounter uint64 GetAllSyncClientJetsMock mReplicaStorageMockGetAllSyncClientJets GetHeavySyncedPulseFunc func(p context.Context, p1 core.RecordID) (r core.PulseNumber, r1 error) GetHeavySyncedPulseCounter uint64 GetHeavySyncedPulsePreCounter uint64 GetHeavySyncedPulseMock mReplicaStorageMockGetHeavySyncedPulse GetSyncClientJetPulsesFunc func(p context.Context, p1 core.RecordID) (r []core.PulseNumber, r1 error) GetSyncClientJetPulsesCounter uint64 GetSyncClientJetPulsesPreCounter uint64 GetSyncClientJetPulsesMock mReplicaStorageMockGetSyncClientJetPulses SetHeavySyncedPulseFunc func(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r error) SetHeavySyncedPulseCounter uint64 SetHeavySyncedPulsePreCounter uint64 SetHeavySyncedPulseMock mReplicaStorageMockSetHeavySyncedPulse SetSyncClientJetPulsesFunc func(p context.Context, p1 core.RecordID, p2 []core.PulseNumber) (r error) SetSyncClientJetPulsesCounter uint64 SetSyncClientJetPulsesPreCounter uint64 SetSyncClientJetPulsesMock mReplicaStorageMockSetSyncClientJetPulses // contains filtered or unexported fields }
ReplicaStorageMock implements github.com/insolar/insolar/ledger/storage.ReplicaStorage
func NewReplicaStorageMock ¶ added in v0.7.5
func NewReplicaStorageMock(t minimock.Tester) *ReplicaStorageMock
NewReplicaStorageMock returns a mock for github.com/insolar/insolar/ledger/storage.ReplicaStorage
func (*ReplicaStorageMock) AllMocksCalled ¶ added in v0.7.5
func (m *ReplicaStorageMock) AllMocksCalled() bool
AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled, it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled())
func (*ReplicaStorageMock) CheckMocksCalled ¶ added in v0.7.5
func (m *ReplicaStorageMock) CheckMocksCalled()
CheckMocksCalled checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*ReplicaStorageMock) Finish ¶ added in v0.7.5
func (m *ReplicaStorageMock) Finish()
Finish checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish or use Finish method of minimock.Controller
func (*ReplicaStorageMock) GetAllNonEmptySyncClientJets ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJets(p context.Context) (r map[core.RecordID][]core.PulseNumber, r1 error)
GetAllNonEmptySyncClientJets implements github.com/insolar/insolar/ledger/storage.ReplicaStorage interface
func (*ReplicaStorageMock) GetAllNonEmptySyncClientJetsFinished ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJetsFinished() bool
GetAllNonEmptySyncClientJetsFinished returns true if mock invocations count is ok
func (*ReplicaStorageMock) GetAllNonEmptySyncClientJetsMinimockCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJetsMinimockCounter() uint64
GetAllNonEmptySyncClientJetsMinimockCounter returns a count of ReplicaStorageMock.GetAllNonEmptySyncClientJetsFunc invocations
func (*ReplicaStorageMock) GetAllNonEmptySyncClientJetsMinimockPreCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllNonEmptySyncClientJetsMinimockPreCounter() uint64
GetAllNonEmptySyncClientJetsMinimockPreCounter returns the value of ReplicaStorageMock.GetAllNonEmptySyncClientJets invocations
func (*ReplicaStorageMock) GetAllSyncClientJets ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllSyncClientJets(p context.Context) (r map[core.RecordID][]core.PulseNumber, r1 error)
GetAllSyncClientJets implements github.com/insolar/insolar/ledger/storage.ReplicaStorage interface
func (*ReplicaStorageMock) GetAllSyncClientJetsFinished ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllSyncClientJetsFinished() bool
GetAllSyncClientJetsFinished returns true if mock invocations count is ok
func (*ReplicaStorageMock) GetAllSyncClientJetsMinimockCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllSyncClientJetsMinimockCounter() uint64
GetAllSyncClientJetsMinimockCounter returns a count of ReplicaStorageMock.GetAllSyncClientJetsFunc invocations
func (*ReplicaStorageMock) GetAllSyncClientJetsMinimockPreCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetAllSyncClientJetsMinimockPreCounter() uint64
GetAllSyncClientJetsMinimockPreCounter returns the value of ReplicaStorageMock.GetAllSyncClientJets invocations
func (*ReplicaStorageMock) GetHeavySyncedPulse ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetHeavySyncedPulse(p context.Context, p1 core.RecordID) (r core.PulseNumber, r1 error)
GetHeavySyncedPulse implements github.com/insolar/insolar/ledger/storage.ReplicaStorage interface
func (*ReplicaStorageMock) GetHeavySyncedPulseFinished ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetHeavySyncedPulseFinished() bool
GetHeavySyncedPulseFinished returns true if mock invocations count is ok
func (*ReplicaStorageMock) GetHeavySyncedPulseMinimockCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetHeavySyncedPulseMinimockCounter() uint64
GetHeavySyncedPulseMinimockCounter returns a count of ReplicaStorageMock.GetHeavySyncedPulseFunc invocations
func (*ReplicaStorageMock) GetHeavySyncedPulseMinimockPreCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetHeavySyncedPulseMinimockPreCounter() uint64
GetHeavySyncedPulseMinimockPreCounter returns the value of ReplicaStorageMock.GetHeavySyncedPulse invocations
func (*ReplicaStorageMock) GetSyncClientJetPulses ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetSyncClientJetPulses(p context.Context, p1 core.RecordID) (r []core.PulseNumber, r1 error)
GetSyncClientJetPulses implements github.com/insolar/insolar/ledger/storage.ReplicaStorage interface
func (*ReplicaStorageMock) GetSyncClientJetPulsesFinished ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetSyncClientJetPulsesFinished() bool
GetSyncClientJetPulsesFinished returns true if mock invocations count is ok
func (*ReplicaStorageMock) GetSyncClientJetPulsesMinimockCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetSyncClientJetPulsesMinimockCounter() uint64
GetSyncClientJetPulsesMinimockCounter returns a count of ReplicaStorageMock.GetSyncClientJetPulsesFunc invocations
func (*ReplicaStorageMock) GetSyncClientJetPulsesMinimockPreCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) GetSyncClientJetPulsesMinimockPreCounter() uint64
GetSyncClientJetPulsesMinimockPreCounter returns the value of ReplicaStorageMock.GetSyncClientJetPulses invocations
func (*ReplicaStorageMock) MinimockFinish ¶ added in v0.7.5
func (m *ReplicaStorageMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*ReplicaStorageMock) MinimockWait ¶ added in v0.7.5
func (m *ReplicaStorageMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*ReplicaStorageMock) SetHeavySyncedPulse ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetHeavySyncedPulse(p context.Context, p1 core.RecordID, p2 core.PulseNumber) (r error)
SetHeavySyncedPulse implements github.com/insolar/insolar/ledger/storage.ReplicaStorage interface
func (*ReplicaStorageMock) SetHeavySyncedPulseFinished ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetHeavySyncedPulseFinished() bool
SetHeavySyncedPulseFinished returns true if mock invocations count is ok
func (*ReplicaStorageMock) SetHeavySyncedPulseMinimockCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetHeavySyncedPulseMinimockCounter() uint64
SetHeavySyncedPulseMinimockCounter returns a count of ReplicaStorageMock.SetHeavySyncedPulseFunc invocations
func (*ReplicaStorageMock) SetHeavySyncedPulseMinimockPreCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetHeavySyncedPulseMinimockPreCounter() uint64
SetHeavySyncedPulseMinimockPreCounter returns the value of ReplicaStorageMock.SetHeavySyncedPulse invocations
func (*ReplicaStorageMock) SetSyncClientJetPulses ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetSyncClientJetPulses(p context.Context, p1 core.RecordID, p2 []core.PulseNumber) (r error)
SetSyncClientJetPulses implements github.com/insolar/insolar/ledger/storage.ReplicaStorage interface
func (*ReplicaStorageMock) SetSyncClientJetPulsesFinished ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetSyncClientJetPulsesFinished() bool
SetSyncClientJetPulsesFinished returns true if mock invocations count is ok
func (*ReplicaStorageMock) SetSyncClientJetPulsesMinimockCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetSyncClientJetPulsesMinimockCounter() uint64
SetSyncClientJetPulsesMinimockCounter returns a count of ReplicaStorageMock.SetSyncClientJetPulsesFunc invocations
func (*ReplicaStorageMock) SetSyncClientJetPulsesMinimockPreCounter ¶ added in v0.7.5
func (m *ReplicaStorageMock) SetSyncClientJetPulsesMinimockPreCounter() uint64
SetSyncClientJetPulsesMinimockPreCounter returns the value of ReplicaStorageMock.SetSyncClientJetPulses invocations
func (*ReplicaStorageMock) ValidateCallCounters ¶ added in v0.7.5
func (m *ReplicaStorageMock) ValidateCallCounters()
ValidateCallCounters checks that all mocked methods of the interface have been called at least once Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller
func (*ReplicaStorageMock) Wait ¶ added in v0.7.5
func (m *ReplicaStorageMock) Wait(timeout time.Duration)
Wait waits for all mocked methods to be called at least once Deprecated: please use MinimockWait or use Wait method of minimock.Controller
type ReplicaStorageMockGetAllNonEmptySyncClientJetsExpectation ¶ added in v0.7.5
type ReplicaStorageMockGetAllNonEmptySyncClientJetsExpectation struct {
// contains filtered or unexported fields
}
func (*ReplicaStorageMockGetAllNonEmptySyncClientJetsExpectation) Return ¶ added in v0.7.5
func (e *ReplicaStorageMockGetAllNonEmptySyncClientJetsExpectation) Return(r map[core.RecordID][]core.PulseNumber, r1 error)
type ReplicaStorageMockGetAllNonEmptySyncClientJetsInput ¶ added in v0.7.5
type ReplicaStorageMockGetAllNonEmptySyncClientJetsInput struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockGetAllNonEmptySyncClientJetsResult ¶ added in v0.7.5
type ReplicaStorageMockGetAllNonEmptySyncClientJetsResult struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockGetAllSyncClientJetsExpectation ¶ added in v0.7.5
type ReplicaStorageMockGetAllSyncClientJetsExpectation struct {
// contains filtered or unexported fields
}
func (*ReplicaStorageMockGetAllSyncClientJetsExpectation) Return ¶ added in v0.7.5
func (e *ReplicaStorageMockGetAllSyncClientJetsExpectation) Return(r map[core.RecordID][]core.PulseNumber, r1 error)
type ReplicaStorageMockGetAllSyncClientJetsInput ¶ added in v0.7.5
type ReplicaStorageMockGetAllSyncClientJetsInput struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockGetAllSyncClientJetsResult ¶ added in v0.7.5
type ReplicaStorageMockGetAllSyncClientJetsResult struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockGetHeavySyncedPulseExpectation ¶ added in v0.7.5
type ReplicaStorageMockGetHeavySyncedPulseExpectation struct {
// contains filtered or unexported fields
}
func (*ReplicaStorageMockGetHeavySyncedPulseExpectation) Return ¶ added in v0.7.5
func (e *ReplicaStorageMockGetHeavySyncedPulseExpectation) Return(r core.PulseNumber, r1 error)
type ReplicaStorageMockGetHeavySyncedPulseInput ¶ added in v0.7.5
type ReplicaStorageMockGetHeavySyncedPulseInput struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockGetHeavySyncedPulseResult ¶ added in v0.7.5
type ReplicaStorageMockGetHeavySyncedPulseResult struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockGetSyncClientJetPulsesExpectation ¶ added in v0.7.5
type ReplicaStorageMockGetSyncClientJetPulsesExpectation struct {
// contains filtered or unexported fields
}
func (*ReplicaStorageMockGetSyncClientJetPulsesExpectation) Return ¶ added in v0.7.5
func (e *ReplicaStorageMockGetSyncClientJetPulsesExpectation) Return(r []core.PulseNumber, r1 error)
type ReplicaStorageMockGetSyncClientJetPulsesInput ¶ added in v0.7.5
type ReplicaStorageMockGetSyncClientJetPulsesInput struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockGetSyncClientJetPulsesResult ¶ added in v0.7.5
type ReplicaStorageMockGetSyncClientJetPulsesResult struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockSetHeavySyncedPulseExpectation ¶ added in v0.7.5
type ReplicaStorageMockSetHeavySyncedPulseExpectation struct {
// contains filtered or unexported fields
}
func (*ReplicaStorageMockSetHeavySyncedPulseExpectation) Return ¶ added in v0.7.5
func (e *ReplicaStorageMockSetHeavySyncedPulseExpectation) Return(r error)
type ReplicaStorageMockSetHeavySyncedPulseInput ¶ added in v0.7.5
type ReplicaStorageMockSetHeavySyncedPulseInput struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockSetHeavySyncedPulseResult ¶ added in v0.7.5
type ReplicaStorageMockSetHeavySyncedPulseResult struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockSetSyncClientJetPulsesExpectation ¶ added in v0.7.5
type ReplicaStorageMockSetSyncClientJetPulsesExpectation struct {
// contains filtered or unexported fields
}
func (*ReplicaStorageMockSetSyncClientJetPulsesExpectation) Return ¶ added in v0.7.5
func (e *ReplicaStorageMockSetSyncClientJetPulsesExpectation) Return(r error)
type ReplicaStorageMockSetSyncClientJetPulsesInput ¶ added in v0.7.5
type ReplicaStorageMockSetSyncClientJetPulsesInput struct {
// contains filtered or unexported fields
}
type ReplicaStorageMockSetSyncClientJetPulsesResult ¶ added in v0.7.5
type ReplicaStorageMockSetSyncClientJetPulsesResult struct {
// contains filtered or unexported fields
}
type Store ¶ added in v0.0.5
type Store interface { GetRecord(ctx context.Context, jetID core.RecordID, ref *core.RecordID) (record.Record, error) SetRecord(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, rec record.Record) (*core.RecordID, error) GetBlob(ctx context.Context, jetID core.RecordID, ref *core.RecordID) ([]byte, error) SetBlob(ctx context.Context, jetID core.RecordID, number core.PulseNumber, blob []byte) (*core.RecordID, error) GetObjectIndex(ctx context.Context, jetID core.RecordID, ref *core.RecordID, forupdate bool) (*index.ObjectLifeline, error) SetObjectIndex(ctx context.Context, jetID core.RecordID, ref *core.RecordID, idx *index.ObjectLifeline) error RemoveObjectIndex(ctx context.Context, jetID core.RecordID, ref *core.RecordID) error // Deprecated: use core.PulseStorage.Current() instead GetLatestPulse(ctx context.Context) (*Pulse, error) GetPulse(ctx context.Context, num core.PulseNumber) (*Pulse, error) }
Store is used by context unaware clients who can work inside transactions as well as outside.
type TransactionManager ¶ added in v0.0.6
type TransactionManager struct {
// contains filtered or unexported fields
}
TransactionManager is used to ensure persistent writes to disk.
func (*TransactionManager) Commit ¶ added in v0.0.6
func (m *TransactionManager) Commit() error
Commit tries to write transaction on disk. Returns error on fail.
func (*TransactionManager) Discard ¶ added in v0.0.6
func (m *TransactionManager) Discard()
Discard terminates transaction without disk writes.
func (*TransactionManager) GetBlob ¶ added in v0.6.2
func (m *TransactionManager) GetBlob(ctx context.Context, jetID core.RecordID, id *core.RecordID) ([]byte, error)
GetBlob returns binary value stored by record ID.
func (*TransactionManager) GetLatestPulse ¶ added in v0.7.5
func (m *TransactionManager) GetLatestPulse(ctx context.Context) (*Pulse, error)
GetLatestPulse returns the latest pulse
func (*TransactionManager) GetObjectIndex ¶ added in v0.0.6
func (m *TransactionManager) GetObjectIndex( ctx context.Context, jetID core.RecordID, id *core.RecordID, forupdate bool, ) (*index.ObjectLifeline, error)
GetObjectIndex fetches object lifeline index.
func (*TransactionManager) GetPulse ¶ added in v0.6.3
func (m *TransactionManager) GetPulse(ctx context.Context, num core.PulseNumber) (*Pulse, error)
GetPulse returns pulse for provided pulse number.
func (*TransactionManager) GetRecord ¶ added in v0.0.6
func (m *TransactionManager) GetRecord(ctx context.Context, jetID core.RecordID, id *core.RecordID) (record.Record, error)
GetRecord returns record from BadgerDB by *record.Reference.
It returns ErrNotFound if the DB does not contain the key.
func (*TransactionManager) GetRequest ¶ added in v0.5.0
func (m *TransactionManager) GetRequest(ctx context.Context, jetID core.RecordID, id *core.RecordID) (record.Request, error)
GetRequest returns request record from BadgerDB by *record.Reference.
It returns ErrNotFound if the DB does not contain the key.
func (*TransactionManager) RemoveObjectIndex ¶ added in v0.7.5
func (m *TransactionManager) RemoveObjectIndex( ctx context.Context, jetID core.RecordID, ref *core.RecordID, ) error
RemoveObjectIndex removes an index of an object
func (*TransactionManager) SetBlob ¶ added in v0.6.2
func (m *TransactionManager) SetBlob(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, blob []byte) (*core.RecordID, error)
SetBlob saves binary value for provided pulse.
func (*TransactionManager) SetObjectIndex ¶ added in v0.0.6
func (m *TransactionManager) SetObjectIndex( ctx context.Context, jetID core.RecordID, id *core.RecordID, idx *index.ObjectLifeline, ) error
SetObjectIndex stores object lifeline index.
func (*TransactionManager) SetRecord ¶ added in v0.0.6
func (m *TransactionManager) SetRecord(ctx context.Context, jetID core.RecordID, pulseNumber core.PulseNumber, rec record.Record) (*core.RecordID, error)
SetRecord stores record in BadgerDB and returns *record.ID of new record.
If record exists returns both *record.ID and ErrOverride error. If record not found returns nil and ErrNotFound error
Source Files ¶
- cleaner.go
- cleaner_mock.go
- db.go
- db_context_mock.go
- doc.go
- drop_storage_mock.go
- dropstorage.go
- errors.go
- genesisinitializer.go
- jet_storage_mock.go
- jetstorage.go
- lock.go
- logger.go
- metrics.go
- node_storage_mock.go
- nodes.go
- nodestorage.go
- object_storage_mock.go
- objectstorage.go
- pulse_tracker_mock.go
- pulsestorage.go
- pulsetracker.go
- pulsetrackerdb.go
- pulsetrackermemory.go
- replica_iter.go
- replica_storage_mock.go
- replicastorage.go
- store.go
- transaction.go
- utils.go
Directories ¶
Path | Synopsis |
---|---|
Package index represents indexes and meta information for records.
|
Package index represents indexes and meta information for records. |
Package jet provides methods for working with Jet objects.
|
Package jet provides methods for working with Jet objects. |
Package record contains code and types for storage records manipulation.
|
Package record contains code and types for storage records manipulation. |
Package storagetest contains high level API tests and test utils for other modules.
|
Package storagetest contains high level API tests and test utils for other modules. |