Documentation ¶
Index ¶
- type PendingObjectContext
- type PendingStorage
- type PendingStorageConcrete
- func (r *PendingStorageConcrete) AddPendingRequest(ctx context.Context, obj, req core.RecordID)
- func (r *PendingStorageConcrete) GetRequests() map[core.RecordID]PendingObjectContext
- func (r *PendingStorageConcrete) GetRequestsForObject(obj core.RecordID) []core.RecordID
- func (r *PendingStorageConcrete) RemovePendingRequest(ctx context.Context, obj, req core.RecordID)
- func (r *PendingStorageConcrete) SetContextToObject(ctx context.Context, obj core.RecordID, objContext PendingObjectContext)
- type PendingStorageMock
- func (m *PendingStorageMock) AddPendingRequest(p context.Context, p1 core.RecordID, p2 core.RecordID)
- func (m *PendingStorageMock) AddPendingRequestFinished() bool
- func (m *PendingStorageMock) AddPendingRequestMinimockCounter() uint64
- func (m *PendingStorageMock) AddPendingRequestMinimockPreCounter() uint64
- func (m *PendingStorageMock) AllMocksCalled() bool
- func (m *PendingStorageMock) CheckMocksCalled()
- func (m *PendingStorageMock) Finish()
- func (m *PendingStorageMock) GetRequests() (r map[core.RecordID]PendingObjectContext)
- func (m *PendingStorageMock) GetRequestsFinished() bool
- func (m *PendingStorageMock) GetRequestsForObject(p core.RecordID) (r []core.RecordID)
- func (m *PendingStorageMock) GetRequestsForObjectFinished() bool
- func (m *PendingStorageMock) GetRequestsForObjectMinimockCounter() uint64
- func (m *PendingStorageMock) GetRequestsForObjectMinimockPreCounter() uint64
- func (m *PendingStorageMock) GetRequestsMinimockCounter() uint64
- func (m *PendingStorageMock) GetRequestsMinimockPreCounter() uint64
- func (m *PendingStorageMock) MinimockFinish()
- func (m *PendingStorageMock) MinimockWait(timeout time.Duration)
- func (m *PendingStorageMock) RemovePendingRequest(p context.Context, p1 core.RecordID, p2 core.RecordID)
- func (m *PendingStorageMock) RemovePendingRequestFinished() bool
- func (m *PendingStorageMock) RemovePendingRequestMinimockCounter() uint64
- func (m *PendingStorageMock) RemovePendingRequestMinimockPreCounter() uint64
- func (m *PendingStorageMock) SetContextToObject(p context.Context, p1 core.RecordID, p2 PendingObjectContext)
- func (m *PendingStorageMock) SetContextToObjectFinished() bool
- func (m *PendingStorageMock) SetContextToObjectMinimockCounter() uint64
- func (m *PendingStorageMock) SetContextToObjectMinimockPreCounter() uint64
- func (m *PendingStorageMock) ValidateCallCounters()
- func (m *PendingStorageMock) Wait(timeout time.Duration)
- type PendingStorageMockAddPendingRequestExpectation
- type PendingStorageMockAddPendingRequestInput
- type PendingStorageMockGetRequestsExpectation
- type PendingStorageMockGetRequestsForObjectExpectation
- type PendingStorageMockGetRequestsForObjectInput
- type PendingStorageMockGetRequestsForObjectResult
- type PendingStorageMockGetRequestsResult
- type PendingStorageMockRemovePendingRequestExpectation
- type PendingStorageMockRemovePendingRequestInput
- type PendingStorageMockSetContextToObjectExpectation
- type PendingStorageMockSetContextToObjectInput
- type Provider
- type ProviderMock
- func (m *ProviderMock) AllMocksCalled() bool
- func (m *ProviderMock) CheckMocksCalled()
- func (m *ProviderMock) CloneIndexStorage(p context.Context, p1 core.RecordID, p2 core.RecordID)
- func (m *ProviderMock) CloneIndexStorageFinished() bool
- func (m *ProviderMock) CloneIndexStorageMinimockCounter() uint64
- func (m *ProviderMock) CloneIndexStorageMinimockPreCounter() uint64
- func (m *ProviderMock) ClonePendingStorage(p context.Context, p1 core.RecordID, p2 core.RecordID)
- func (m *ProviderMock) ClonePendingStorageFinished() bool
- func (m *ProviderMock) ClonePendingStorageMinimockCounter() uint64
- func (m *ProviderMock) ClonePendingStorageMinimockPreCounter() uint64
- func (m *ProviderMock) Count() (r int)
- func (m *ProviderMock) CountFinished() bool
- func (m *ProviderMock) CountMinimockCounter() uint64
- func (m *ProviderMock) CountMinimockPreCounter() uint64
- func (m *ProviderMock) DecreaseIndexesTTL(p context.Context) (r map[core.RecordID][]core.RecordID)
- func (m *ProviderMock) DecreaseIndexesTTLFinished() bool
- func (m *ProviderMock) DecreaseIndexesTTLMinimockCounter() uint64
- func (m *ProviderMock) DecreaseIndexesTTLMinimockPreCounter() uint64
- func (m *ProviderMock) Finish()
- func (m *ProviderMock) GetIndexStorage(p context.Context, p1 core.RecordID) (r RecentIndexStorage)
- func (m *ProviderMock) GetIndexStorageFinished() bool
- func (m *ProviderMock) GetIndexStorageMinimockCounter() uint64
- func (m *ProviderMock) GetIndexStorageMinimockPreCounter() uint64
- func (m *ProviderMock) GetPendingStorage(p context.Context, p1 core.RecordID) (r PendingStorage)
- func (m *ProviderMock) GetPendingStorageFinished() bool
- func (m *ProviderMock) GetPendingStorageMinimockCounter() uint64
- func (m *ProviderMock) GetPendingStorageMinimockPreCounter() uint64
- func (m *ProviderMock) MinimockFinish()
- func (m *ProviderMock) MinimockWait(timeout time.Duration)
- func (m *ProviderMock) RemovePendingStorage(p context.Context, p1 core.RecordID)
- func (m *ProviderMock) RemovePendingStorageFinished() bool
- func (m *ProviderMock) RemovePendingStorageMinimockCounter() uint64
- func (m *ProviderMock) RemovePendingStorageMinimockPreCounter() uint64
- func (m *ProviderMock) ValidateCallCounters()
- func (m *ProviderMock) Wait(timeout time.Duration)
- type ProviderMockCloneIndexStorageExpectation
- type ProviderMockCloneIndexStorageInput
- type ProviderMockClonePendingStorageExpectation
- type ProviderMockClonePendingStorageInput
- type ProviderMockCountExpectation
- type ProviderMockCountResult
- type ProviderMockDecreaseIndexesTTLExpectation
- type ProviderMockDecreaseIndexesTTLInput
- type ProviderMockDecreaseIndexesTTLResult
- type ProviderMockGetIndexStorageExpectation
- type ProviderMockGetIndexStorageInput
- type ProviderMockGetIndexStorageResult
- type ProviderMockGetPendingStorageExpectation
- type ProviderMockGetPendingStorageInput
- type ProviderMockGetPendingStorageResult
- type ProviderMockRemovePendingStorageExpectation
- type ProviderMockRemovePendingStorageInput
- type RecentIndexStorage
- type RecentIndexStorageConcrete
- func (r *RecentIndexStorageConcrete) AddObject(ctx context.Context, id core.RecordID)
- func (r *RecentIndexStorageConcrete) AddObjectWithTLL(ctx context.Context, id core.RecordID, ttl int)
- func (r *RecentIndexStorageConcrete) DecreaseIndexTTL(ctx context.Context) []core.RecordID
- func (r *RecentIndexStorageConcrete) FilterNotExistWithLock(ctx context.Context, candidates []core.RecordID, ...)
- func (r *RecentIndexStorageConcrete) GetObjects() map[core.RecordID]int
- type RecentIndexStorageMock
- func (m *RecentIndexStorageMock) AddObject(p context.Context, p1 core.RecordID)
- func (m *RecentIndexStorageMock) AddObjectFinished() bool
- func (m *RecentIndexStorageMock) AddObjectMinimockCounter() uint64
- func (m *RecentIndexStorageMock) AddObjectMinimockPreCounter() uint64
- func (m *RecentIndexStorageMock) AddObjectWithTLL(p context.Context, p1 core.RecordID, p2 int)
- func (m *RecentIndexStorageMock) AddObjectWithTLLFinished() bool
- func (m *RecentIndexStorageMock) AddObjectWithTLLMinimockCounter() uint64
- func (m *RecentIndexStorageMock) AddObjectWithTLLMinimockPreCounter() uint64
- func (m *RecentIndexStorageMock) AllMocksCalled() bool
- func (m *RecentIndexStorageMock) CheckMocksCalled()
- func (m *RecentIndexStorageMock) DecreaseIndexTTL(p context.Context) (r []core.RecordID)
- func (m *RecentIndexStorageMock) DecreaseIndexTTLFinished() bool
- func (m *RecentIndexStorageMock) DecreaseIndexTTLMinimockCounter() uint64
- func (m *RecentIndexStorageMock) DecreaseIndexTTLMinimockPreCounter() uint64
- func (m *RecentIndexStorageMock) FilterNotExistWithLock(p context.Context, p1 []core.RecordID, p2 func(p []core.RecordID))
- func (m *RecentIndexStorageMock) FilterNotExistWithLockFinished() bool
- func (m *RecentIndexStorageMock) FilterNotExistWithLockMinimockCounter() uint64
- func (m *RecentIndexStorageMock) FilterNotExistWithLockMinimockPreCounter() uint64
- func (m *RecentIndexStorageMock) Finish()
- func (m *RecentIndexStorageMock) GetObjects() (r map[core.RecordID]int)
- func (m *RecentIndexStorageMock) GetObjectsFinished() bool
- func (m *RecentIndexStorageMock) GetObjectsMinimockCounter() uint64
- func (m *RecentIndexStorageMock) GetObjectsMinimockPreCounter() uint64
- func (m *RecentIndexStorageMock) MinimockFinish()
- func (m *RecentIndexStorageMock) MinimockWait(timeout time.Duration)
- func (m *RecentIndexStorageMock) ValidateCallCounters()
- func (m *RecentIndexStorageMock) Wait(timeout time.Duration)
- type RecentIndexStorageMockAddObjectExpectation
- type RecentIndexStorageMockAddObjectInput
- type RecentIndexStorageMockAddObjectWithTLLExpectation
- type RecentIndexStorageMockAddObjectWithTLLInput
- type RecentIndexStorageMockDecreaseIndexTTLExpectation
- type RecentIndexStorageMockDecreaseIndexTTLInput
- type RecentIndexStorageMockDecreaseIndexTTLResult
- type RecentIndexStorageMockFilterNotExistWithLockExpectation
- type RecentIndexStorageMockFilterNotExistWithLockInput
- type RecentIndexStorageMockGetObjectsExpectation
- type RecentIndexStorageMockGetObjectsResult
- type RecentStorageProvider
- func (p *RecentStorageProvider) CloneIndexStorage(ctx context.Context, fromJetID, toJetID core.RecordID)
- func (p *RecentStorageProvider) ClonePendingStorage(ctx context.Context, fromJetID, toJetID core.RecordID)
- func (p *RecentStorageProvider) Count() int
- func (p *RecentStorageProvider) DecreaseIndexesTTL(ctx context.Context) map[core.RecordID][]core.RecordID
- func (p *RecentStorageProvider) GetIndexStorage(ctx context.Context, jetID core.RecordID) RecentIndexStorage
- func (p *RecentStorageProvider) GetPendingStorage(ctx context.Context, jetID core.RecordID) PendingStorage
- func (p *RecentStorageProvider) RemovePendingStorage(ctx context.Context, id core.RecordID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PendingObjectContext ¶ added in v0.8.0
PendingObjectContext contains a list of requests for an object Also it contains a boolean-flag for determination object's status If It's false, current LME, when it gets a hot-data, needs to send notifications about forgotten requests
type PendingStorage ¶ added in v0.8.0
type PendingStorage interface { AddPendingRequest(ctx context.Context, obj, req core.RecordID) SetContextToObject(ctx context.Context, obj core.RecordID, objContext PendingObjectContext) GetRequests() map[core.RecordID]PendingObjectContext GetRequestsForObject(obj core.RecordID) []core.RecordID RemovePendingRequest(ctx context.Context, obj, req core.RecordID) }
type PendingStorageConcrete ¶ added in v0.8.0
type PendingStorageConcrete struct {
// contains filtered or unexported fields
}
PendingStorageConcrete contains indexes of unclosed requests (pendings) for a specific object id
func NewPendingStorage ¶ added in v0.8.0
func NewPendingStorage(jetID core.RecordID) *PendingStorageConcrete
NewPendingStorage creates *PendingStorage
func (*PendingStorageConcrete) AddPendingRequest ¶ added in v0.8.0
func (r *PendingStorageConcrete) AddPendingRequest(ctx context.Context, obj, req core.RecordID)
AddPendingRequest adds an id of pending request to memory The id stores in a collection ids of a specific object
func (*PendingStorageConcrete) GetRequests ¶ added in v0.8.0
func (r *PendingStorageConcrete) GetRequests() map[core.RecordID]PendingObjectContext
GetRequests returns a deep-copy of requests collections
func (*PendingStorageConcrete) GetRequestsForObject ¶ added in v0.8.0
func (r *PendingStorageConcrete) GetRequestsForObject(obj core.RecordID) []core.RecordID
GetRequestsForObject returns a deep-copy of requests collection for a specific object
func (*PendingStorageConcrete) RemovePendingRequest ¶ added in v0.8.0
func (r *PendingStorageConcrete) RemovePendingRequest(ctx context.Context, obj, req core.RecordID)
RemovePendingRequest removes a request on object from cache
func (*PendingStorageConcrete) SetContextToObject ¶ added in v0.8.0
func (r *PendingStorageConcrete) SetContextToObject(ctx context.Context, obj core.RecordID, objContext PendingObjectContext)
SetContextToObject add a context to a provided object
type PendingStorageMock ¶ added in v0.8.0
type PendingStorageMock struct { AddPendingRequestFunc func(p context.Context, p1 core.RecordID, p2 core.RecordID) AddPendingRequestCounter uint64 AddPendingRequestPreCounter uint64 AddPendingRequestMock mPendingStorageMockAddPendingRequest GetRequestsFunc func() (r map[core.RecordID]PendingObjectContext) GetRequestsCounter uint64 GetRequestsPreCounter uint64 GetRequestsMock mPendingStorageMockGetRequests GetRequestsForObjectFunc func(p core.RecordID) (r []core.RecordID) GetRequestsForObjectCounter uint64 GetRequestsForObjectPreCounter uint64 GetRequestsForObjectMock mPendingStorageMockGetRequestsForObject RemovePendingRequestFunc func(p context.Context, p1 core.RecordID, p2 core.RecordID) RemovePendingRequestCounter uint64 RemovePendingRequestPreCounter uint64 RemovePendingRequestMock mPendingStorageMockRemovePendingRequest SetContextToObjectFunc func(p context.Context, p1 core.RecordID, p2 PendingObjectContext) SetContextToObjectCounter uint64 SetContextToObjectPreCounter uint64 SetContextToObjectMock mPendingStorageMockSetContextToObject // contains filtered or unexported fields }
PendingStorageMock implements github.com/insolar/insolar/ledger/recentstorage.PendingStorage
func NewPendingStorageMock ¶ added in v0.8.0
func NewPendingStorageMock(t minimock.Tester) *PendingStorageMock
NewPendingStorageMock returns a mock for github.com/insolar/insolar/ledger/recentstorage.PendingStorage
func (*PendingStorageMock) AddPendingRequest ¶ added in v0.8.0
func (m *PendingStorageMock) AddPendingRequest(p context.Context, p1 core.RecordID, p2 core.RecordID)
AddPendingRequest implements github.com/insolar/insolar/ledger/recentstorage.PendingStorage interface
func (*PendingStorageMock) AddPendingRequestFinished ¶ added in v0.8.0
func (m *PendingStorageMock) AddPendingRequestFinished() bool
AddPendingRequestFinished returns true if mock invocations count is ok
func (*PendingStorageMock) AddPendingRequestMinimockCounter ¶ added in v0.8.0
func (m *PendingStorageMock) AddPendingRequestMinimockCounter() uint64
AddPendingRequestMinimockCounter returns a count of PendingStorageMock.AddPendingRequestFunc invocations
func (*PendingStorageMock) AddPendingRequestMinimockPreCounter ¶ added in v0.8.0
func (m *PendingStorageMock) AddPendingRequestMinimockPreCounter() uint64
AddPendingRequestMinimockPreCounter returns the value of PendingStorageMock.AddPendingRequest invocations
func (*PendingStorageMock) AllMocksCalled ¶ added in v0.8.0
func (m *PendingStorageMock) 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 (*PendingStorageMock) CheckMocksCalled ¶ added in v0.8.0
func (m *PendingStorageMock) 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 (*PendingStorageMock) Finish ¶ added in v0.8.0
func (m *PendingStorageMock) 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 (*PendingStorageMock) GetRequests ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequests() (r map[core.RecordID]PendingObjectContext)
GetRequests implements github.com/insolar/insolar/ledger/recentstorage.PendingStorage interface
func (*PendingStorageMock) GetRequestsFinished ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequestsFinished() bool
GetRequestsFinished returns true if mock invocations count is ok
func (*PendingStorageMock) GetRequestsForObject ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequestsForObject(p core.RecordID) (r []core.RecordID)
GetRequestsForObject implements github.com/insolar/insolar/ledger/recentstorage.PendingStorage interface
func (*PendingStorageMock) GetRequestsForObjectFinished ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequestsForObjectFinished() bool
GetRequestsForObjectFinished returns true if mock invocations count is ok
func (*PendingStorageMock) GetRequestsForObjectMinimockCounter ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequestsForObjectMinimockCounter() uint64
GetRequestsForObjectMinimockCounter returns a count of PendingStorageMock.GetRequestsForObjectFunc invocations
func (*PendingStorageMock) GetRequestsForObjectMinimockPreCounter ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequestsForObjectMinimockPreCounter() uint64
GetRequestsForObjectMinimockPreCounter returns the value of PendingStorageMock.GetRequestsForObject invocations
func (*PendingStorageMock) GetRequestsMinimockCounter ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequestsMinimockCounter() uint64
GetRequestsMinimockCounter returns a count of PendingStorageMock.GetRequestsFunc invocations
func (*PendingStorageMock) GetRequestsMinimockPreCounter ¶ added in v0.8.0
func (m *PendingStorageMock) GetRequestsMinimockPreCounter() uint64
GetRequestsMinimockPreCounter returns the value of PendingStorageMock.GetRequests invocations
func (*PendingStorageMock) MinimockFinish ¶ added in v0.8.0
func (m *PendingStorageMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*PendingStorageMock) MinimockWait ¶ added in v0.8.0
func (m *PendingStorageMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*PendingStorageMock) RemovePendingRequest ¶ added in v0.8.0
func (m *PendingStorageMock) RemovePendingRequest(p context.Context, p1 core.RecordID, p2 core.RecordID)
RemovePendingRequest implements github.com/insolar/insolar/ledger/recentstorage.PendingStorage interface
func (*PendingStorageMock) RemovePendingRequestFinished ¶ added in v0.8.0
func (m *PendingStorageMock) RemovePendingRequestFinished() bool
RemovePendingRequestFinished returns true if mock invocations count is ok
func (*PendingStorageMock) RemovePendingRequestMinimockCounter ¶ added in v0.8.0
func (m *PendingStorageMock) RemovePendingRequestMinimockCounter() uint64
RemovePendingRequestMinimockCounter returns a count of PendingStorageMock.RemovePendingRequestFunc invocations
func (*PendingStorageMock) RemovePendingRequestMinimockPreCounter ¶ added in v0.8.0
func (m *PendingStorageMock) RemovePendingRequestMinimockPreCounter() uint64
RemovePendingRequestMinimockPreCounter returns the value of PendingStorageMock.RemovePendingRequest invocations
func (*PendingStorageMock) SetContextToObject ¶ added in v0.8.0
func (m *PendingStorageMock) SetContextToObject(p context.Context, p1 core.RecordID, p2 PendingObjectContext)
SetContextToObject implements github.com/insolar/insolar/ledger/recentstorage.PendingStorage interface
func (*PendingStorageMock) SetContextToObjectFinished ¶ added in v0.8.0
func (m *PendingStorageMock) SetContextToObjectFinished() bool
SetContextToObjectFinished returns true if mock invocations count is ok
func (*PendingStorageMock) SetContextToObjectMinimockCounter ¶ added in v0.8.0
func (m *PendingStorageMock) SetContextToObjectMinimockCounter() uint64
SetContextToObjectMinimockCounter returns a count of PendingStorageMock.SetContextToObjectFunc invocations
func (*PendingStorageMock) SetContextToObjectMinimockPreCounter ¶ added in v0.8.0
func (m *PendingStorageMock) SetContextToObjectMinimockPreCounter() uint64
SetContextToObjectMinimockPreCounter returns the value of PendingStorageMock.SetContextToObject invocations
func (*PendingStorageMock) ValidateCallCounters ¶ added in v0.8.0
func (m *PendingStorageMock) 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 (*PendingStorageMock) Wait ¶ added in v0.8.0
func (m *PendingStorageMock) 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 PendingStorageMockAddPendingRequestExpectation ¶ added in v0.8.0
type PendingStorageMockAddPendingRequestExpectation struct {
// contains filtered or unexported fields
}
type PendingStorageMockAddPendingRequestInput ¶ added in v0.8.0
type PendingStorageMockAddPendingRequestInput struct {
// contains filtered or unexported fields
}
type PendingStorageMockGetRequestsExpectation ¶ added in v0.8.0
type PendingStorageMockGetRequestsExpectation struct {
// contains filtered or unexported fields
}
func (*PendingStorageMockGetRequestsExpectation) Return ¶ added in v0.8.0
func (e *PendingStorageMockGetRequestsExpectation) Return(r map[core.RecordID]PendingObjectContext)
type PendingStorageMockGetRequestsForObjectExpectation ¶ added in v0.8.0
type PendingStorageMockGetRequestsForObjectExpectation struct {
// contains filtered or unexported fields
}
func (*PendingStorageMockGetRequestsForObjectExpectation) Return ¶ added in v0.8.0
func (e *PendingStorageMockGetRequestsForObjectExpectation) Return(r []core.RecordID)
type PendingStorageMockGetRequestsForObjectInput ¶ added in v0.8.0
type PendingStorageMockGetRequestsForObjectInput struct {
// contains filtered or unexported fields
}
type PendingStorageMockGetRequestsForObjectResult ¶ added in v0.8.0
type PendingStorageMockGetRequestsForObjectResult struct {
// contains filtered or unexported fields
}
type PendingStorageMockGetRequestsResult ¶ added in v0.8.0
type PendingStorageMockGetRequestsResult struct {
// contains filtered or unexported fields
}
type PendingStorageMockRemovePendingRequestExpectation ¶ added in v0.8.0
type PendingStorageMockRemovePendingRequestExpectation struct {
// contains filtered or unexported fields
}
type PendingStorageMockRemovePendingRequestInput ¶ added in v0.8.0
type PendingStorageMockRemovePendingRequestInput struct {
// contains filtered or unexported fields
}
type PendingStorageMockSetContextToObjectExpectation ¶ added in v0.8.0
type PendingStorageMockSetContextToObjectExpectation struct {
// contains filtered or unexported fields
}
type PendingStorageMockSetContextToObjectInput ¶ added in v0.8.0
type PendingStorageMockSetContextToObjectInput struct {
// contains filtered or unexported fields
}
type Provider ¶
type Provider interface { GetIndexStorage(ctx context.Context, jetID core.RecordID) RecentIndexStorage GetPendingStorage(ctx context.Context, jetID core.RecordID) PendingStorage Count() int CloneIndexStorage(ctx context.Context, fromJetID, toJetID core.RecordID) ClonePendingStorage(ctx context.Context, fromJetID, toJetID core.RecordID) DecreaseIndexesTTL(ctx context.Context) map[core.RecordID][]core.RecordID RemovePendingStorage(ctx context.Context, id core.RecordID) }
Provider provides different types of storages for a specific jet
type ProviderMock ¶
type ProviderMock struct { CloneIndexStorageFunc func(p context.Context, p1 core.RecordID, p2 core.RecordID) CloneIndexStorageCounter uint64 CloneIndexStoragePreCounter uint64 CloneIndexStorageMock mProviderMockCloneIndexStorage ClonePendingStorageFunc func(p context.Context, p1 core.RecordID, p2 core.RecordID) ClonePendingStorageCounter uint64 ClonePendingStoragePreCounter uint64 ClonePendingStorageMock mProviderMockClonePendingStorage CountFunc func() (r int) CountCounter uint64 CountPreCounter uint64 CountMock mProviderMockCount DecreaseIndexesTTLFunc func(p context.Context) (r map[core.RecordID][]core.RecordID) DecreaseIndexesTTLCounter uint64 DecreaseIndexesTTLPreCounter uint64 DecreaseIndexesTTLMock mProviderMockDecreaseIndexesTTL GetIndexStorageFunc func(p context.Context, p1 core.RecordID) (r RecentIndexStorage) GetIndexStorageCounter uint64 GetIndexStoragePreCounter uint64 GetIndexStorageMock mProviderMockGetIndexStorage GetPendingStorageFunc func(p context.Context, p1 core.RecordID) (r PendingStorage) GetPendingStorageCounter uint64 GetPendingStoragePreCounter uint64 GetPendingStorageMock mProviderMockGetPendingStorage RemovePendingStorageFunc func(p context.Context, p1 core.RecordID) RemovePendingStorageCounter uint64 RemovePendingStoragePreCounter uint64 RemovePendingStorageMock mProviderMockRemovePendingStorage // contains filtered or unexported fields }
ProviderMock implements github.com/insolar/insolar/ledger/recentstorage.Provider
func NewProviderMock ¶
func NewProviderMock(t minimock.Tester) *ProviderMock
NewProviderMock returns a mock for github.com/insolar/insolar/ledger/recentstorage.Provider
func (*ProviderMock) AllMocksCalled ¶
func (m *ProviderMock) 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 (*ProviderMock) CheckMocksCalled ¶
func (m *ProviderMock) 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 (*ProviderMock) CloneIndexStorage ¶ added in v0.8.0
CloneIndexStorage implements github.com/insolar/insolar/ledger/recentstorage.Provider interface
func (*ProviderMock) CloneIndexStorageFinished ¶ added in v0.8.0
func (m *ProviderMock) CloneIndexStorageFinished() bool
CloneIndexStorageFinished returns true if mock invocations count is ok
func (*ProviderMock) CloneIndexStorageMinimockCounter ¶ added in v0.8.0
func (m *ProviderMock) CloneIndexStorageMinimockCounter() uint64
CloneIndexStorageMinimockCounter returns a count of ProviderMock.CloneIndexStorageFunc invocations
func (*ProviderMock) CloneIndexStorageMinimockPreCounter ¶ added in v0.8.0
func (m *ProviderMock) CloneIndexStorageMinimockPreCounter() uint64
CloneIndexStorageMinimockPreCounter returns the value of ProviderMock.CloneIndexStorage invocations
func (*ProviderMock) ClonePendingStorage ¶ added in v0.8.0
ClonePendingStorage implements github.com/insolar/insolar/ledger/recentstorage.Provider interface
func (*ProviderMock) ClonePendingStorageFinished ¶ added in v0.8.0
func (m *ProviderMock) ClonePendingStorageFinished() bool
ClonePendingStorageFinished returns true if mock invocations count is ok
func (*ProviderMock) ClonePendingStorageMinimockCounter ¶ added in v0.8.0
func (m *ProviderMock) ClonePendingStorageMinimockCounter() uint64
ClonePendingStorageMinimockCounter returns a count of ProviderMock.ClonePendingStorageFunc invocations
func (*ProviderMock) ClonePendingStorageMinimockPreCounter ¶ added in v0.8.0
func (m *ProviderMock) ClonePendingStorageMinimockPreCounter() uint64
ClonePendingStorageMinimockPreCounter returns the value of ProviderMock.ClonePendingStorage invocations
func (*ProviderMock) Count ¶ added in v0.8.0
func (m *ProviderMock) Count() (r int)
Count implements github.com/insolar/insolar/ledger/recentstorage.Provider interface
func (*ProviderMock) CountFinished ¶ added in v0.8.0
func (m *ProviderMock) CountFinished() bool
CountFinished returns true if mock invocations count is ok
func (*ProviderMock) CountMinimockCounter ¶ added in v0.8.0
func (m *ProviderMock) CountMinimockCounter() uint64
CountMinimockCounter returns a count of ProviderMock.CountFunc invocations
func (*ProviderMock) CountMinimockPreCounter ¶ added in v0.8.0
func (m *ProviderMock) CountMinimockPreCounter() uint64
CountMinimockPreCounter returns the value of ProviderMock.Count invocations
func (*ProviderMock) DecreaseIndexesTTL ¶ added in v0.8.0
DecreaseIndexesTTL implements github.com/insolar/insolar/ledger/recentstorage.Provider interface
func (*ProviderMock) DecreaseIndexesTTLFinished ¶ added in v0.8.0
func (m *ProviderMock) DecreaseIndexesTTLFinished() bool
DecreaseIndexesTTLFinished returns true if mock invocations count is ok
func (*ProviderMock) DecreaseIndexesTTLMinimockCounter ¶ added in v0.8.0
func (m *ProviderMock) DecreaseIndexesTTLMinimockCounter() uint64
DecreaseIndexesTTLMinimockCounter returns a count of ProviderMock.DecreaseIndexesTTLFunc invocations
func (*ProviderMock) DecreaseIndexesTTLMinimockPreCounter ¶ added in v0.8.0
func (m *ProviderMock) DecreaseIndexesTTLMinimockPreCounter() uint64
DecreaseIndexesTTLMinimockPreCounter returns the value of ProviderMock.DecreaseIndexesTTL invocations
func (*ProviderMock) Finish ¶
func (m *ProviderMock) 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 (*ProviderMock) GetIndexStorage ¶ added in v0.8.0
func (m *ProviderMock) GetIndexStorage(p context.Context, p1 core.RecordID) (r RecentIndexStorage)
GetIndexStorage implements github.com/insolar/insolar/ledger/recentstorage.Provider interface
func (*ProviderMock) GetIndexStorageFinished ¶ added in v0.8.0
func (m *ProviderMock) GetIndexStorageFinished() bool
GetIndexStorageFinished returns true if mock invocations count is ok
func (*ProviderMock) GetIndexStorageMinimockCounter ¶ added in v0.8.0
func (m *ProviderMock) GetIndexStorageMinimockCounter() uint64
GetIndexStorageMinimockCounter returns a count of ProviderMock.GetIndexStorageFunc invocations
func (*ProviderMock) GetIndexStorageMinimockPreCounter ¶ added in v0.8.0
func (m *ProviderMock) GetIndexStorageMinimockPreCounter() uint64
GetIndexStorageMinimockPreCounter returns the value of ProviderMock.GetIndexStorage invocations
func (*ProviderMock) GetPendingStorage ¶ added in v0.8.0
func (m *ProviderMock) GetPendingStorage(p context.Context, p1 core.RecordID) (r PendingStorage)
GetPendingStorage implements github.com/insolar/insolar/ledger/recentstorage.Provider interface
func (*ProviderMock) GetPendingStorageFinished ¶ added in v0.8.0
func (m *ProviderMock) GetPendingStorageFinished() bool
GetPendingStorageFinished returns true if mock invocations count is ok
func (*ProviderMock) GetPendingStorageMinimockCounter ¶ added in v0.8.0
func (m *ProviderMock) GetPendingStorageMinimockCounter() uint64
GetPendingStorageMinimockCounter returns a count of ProviderMock.GetPendingStorageFunc invocations
func (*ProviderMock) GetPendingStorageMinimockPreCounter ¶ added in v0.8.0
func (m *ProviderMock) GetPendingStorageMinimockPreCounter() uint64
GetPendingStorageMinimockPreCounter returns the value of ProviderMock.GetPendingStorage invocations
func (*ProviderMock) MinimockFinish ¶
func (m *ProviderMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*ProviderMock) MinimockWait ¶
func (m *ProviderMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*ProviderMock) RemovePendingStorage ¶ added in v0.8.0
func (m *ProviderMock) RemovePendingStorage(p context.Context, p1 core.RecordID)
RemovePendingStorage implements github.com/insolar/insolar/ledger/recentstorage.Provider interface
func (*ProviderMock) RemovePendingStorageFinished ¶ added in v0.8.0
func (m *ProviderMock) RemovePendingStorageFinished() bool
RemovePendingStorageFinished returns true if mock invocations count is ok
func (*ProviderMock) RemovePendingStorageMinimockCounter ¶ added in v0.8.0
func (m *ProviderMock) RemovePendingStorageMinimockCounter() uint64
RemovePendingStorageMinimockCounter returns a count of ProviderMock.RemovePendingStorageFunc invocations
func (*ProviderMock) RemovePendingStorageMinimockPreCounter ¶ added in v0.8.0
func (m *ProviderMock) RemovePendingStorageMinimockPreCounter() uint64
RemovePendingStorageMinimockPreCounter returns the value of ProviderMock.RemovePendingStorage invocations
func (*ProviderMock) ValidateCallCounters ¶
func (m *ProviderMock) 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 (*ProviderMock) Wait ¶
func (m *ProviderMock) 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 ProviderMockCloneIndexStorageExpectation ¶ added in v0.8.0
type ProviderMockCloneIndexStorageExpectation struct {
// contains filtered or unexported fields
}
type ProviderMockCloneIndexStorageInput ¶ added in v0.8.0
type ProviderMockCloneIndexStorageInput struct {
// contains filtered or unexported fields
}
type ProviderMockClonePendingStorageExpectation ¶ added in v0.8.0
type ProviderMockClonePendingStorageExpectation struct {
// contains filtered or unexported fields
}
type ProviderMockClonePendingStorageInput ¶ added in v0.8.0
type ProviderMockClonePendingStorageInput struct {
// contains filtered or unexported fields
}
type ProviderMockCountExpectation ¶ added in v0.8.0
type ProviderMockCountExpectation struct {
// contains filtered or unexported fields
}
func (*ProviderMockCountExpectation) Return ¶ added in v0.8.0
func (e *ProviderMockCountExpectation) Return(r int)
type ProviderMockCountResult ¶ added in v0.8.0
type ProviderMockCountResult struct {
// contains filtered or unexported fields
}
type ProviderMockDecreaseIndexesTTLExpectation ¶ added in v0.8.0
type ProviderMockDecreaseIndexesTTLExpectation struct {
// contains filtered or unexported fields
}
type ProviderMockDecreaseIndexesTTLInput ¶ added in v0.8.0
type ProviderMockDecreaseIndexesTTLInput struct {
// contains filtered or unexported fields
}
type ProviderMockDecreaseIndexesTTLResult ¶ added in v0.8.0
type ProviderMockDecreaseIndexesTTLResult struct {
// contains filtered or unexported fields
}
type ProviderMockGetIndexStorageExpectation ¶ added in v0.8.0
type ProviderMockGetIndexStorageExpectation struct {
// contains filtered or unexported fields
}
func (*ProviderMockGetIndexStorageExpectation) Return ¶ added in v0.8.0
func (e *ProviderMockGetIndexStorageExpectation) Return(r RecentIndexStorage)
type ProviderMockGetIndexStorageInput ¶ added in v0.8.0
type ProviderMockGetIndexStorageInput struct {
// contains filtered or unexported fields
}
type ProviderMockGetIndexStorageResult ¶ added in v0.8.0
type ProviderMockGetIndexStorageResult struct {
// contains filtered or unexported fields
}
type ProviderMockGetPendingStorageExpectation ¶ added in v0.8.0
type ProviderMockGetPendingStorageExpectation struct {
// contains filtered or unexported fields
}
func (*ProviderMockGetPendingStorageExpectation) Return ¶ added in v0.8.0
func (e *ProviderMockGetPendingStorageExpectation) Return(r PendingStorage)
type ProviderMockGetPendingStorageInput ¶ added in v0.8.0
type ProviderMockGetPendingStorageInput struct {
// contains filtered or unexported fields
}
type ProviderMockGetPendingStorageResult ¶ added in v0.8.0
type ProviderMockGetPendingStorageResult struct {
// contains filtered or unexported fields
}
type ProviderMockRemovePendingStorageExpectation ¶ added in v0.8.0
type ProviderMockRemovePendingStorageExpectation struct {
// contains filtered or unexported fields
}
type ProviderMockRemovePendingStorageInput ¶ added in v0.8.0
type ProviderMockRemovePendingStorageInput struct {
// contains filtered or unexported fields
}
type RecentIndexStorage ¶ added in v0.8.0
type RecentIndexStorage interface { AddObject(ctx context.Context, id core.RecordID) AddObjectWithTLL(ctx context.Context, id core.RecordID, ttl int) GetObjects() map[core.RecordID]int DecreaseIndexTTL(ctx context.Context) []core.RecordID FilterNotExistWithLock(ctx context.Context, candidates []core.RecordID, fn func(filtered []core.RecordID)) }
RecentIndexStorage is a struct which contains `recent indexes` for a specific jet `recent index` is a index which was called between TTL-border If index is put to a recent storage, it'll be there for TTL-pulses at least
type RecentIndexStorageConcrete ¶ added in v0.8.0
type RecentIndexStorageConcrete struct { DefaultTTL int // contains filtered or unexported fields }
RecentIndexStorageConcrete is an implementation of RecentIndexStorage interface This is a in-memory cache for indexes` ids
func NewRecentIndexStorage ¶ added in v0.8.0
func NewRecentIndexStorage(jetID core.RecordID, defaultTTL int) *RecentIndexStorageConcrete
NewRecentIndexStorage creates new *RecentIndexStorage
func (*RecentIndexStorageConcrete) AddObject ¶ added in v0.8.0
func (r *RecentIndexStorageConcrete) AddObject(ctx context.Context, id core.RecordID)
AddObject adds index's id to an in-memory cache and sets DefaultTTL for it
func (*RecentIndexStorageConcrete) AddObjectWithTLL ¶ added in v0.8.0
func (r *RecentIndexStorageConcrete) AddObjectWithTLL(ctx context.Context, id core.RecordID, ttl int)
AddObjectWithTLL adds index's id to an in-memory cache with provided ttl
func (*RecentIndexStorageConcrete) DecreaseIndexTTL ¶ added in v0.8.0
func (r *RecentIndexStorageConcrete) DecreaseIndexTTL(ctx context.Context) []core.RecordID
DecreaseIndexTTL decreases ttls and remove indexes with 0 ttl Removed indexes will be returned as a functon's result
func (*RecentIndexStorageConcrete) FilterNotExistWithLock ¶ added in v0.8.0
func (r *RecentIndexStorageConcrete) FilterNotExistWithLock( ctx context.Context, candidates []core.RecordID, lockedFn func(filtered []core.RecordID), )
FilterNotExistWithLock filters candidates from params found indexes, which aren't removed from cache and the passes it to lockedFn
func (*RecentIndexStorageConcrete) GetObjects ¶ added in v0.8.0
func (r *RecentIndexStorageConcrete) GetObjects() map[core.RecordID]int
GetObjects returns deep copy of indexes' ids
type RecentIndexStorageMock ¶ added in v0.8.0
type RecentIndexStorageMock struct { AddObjectFunc func(p context.Context, p1 core.RecordID) AddObjectCounter uint64 AddObjectPreCounter uint64 AddObjectMock mRecentIndexStorageMockAddObject AddObjectWithTLLFunc func(p context.Context, p1 core.RecordID, p2 int) AddObjectWithTLLCounter uint64 AddObjectWithTLLPreCounter uint64 AddObjectWithTLLMock mRecentIndexStorageMockAddObjectWithTLL DecreaseIndexTTLFunc func(p context.Context) (r []core.RecordID) DecreaseIndexTTLCounter uint64 DecreaseIndexTTLPreCounter uint64 DecreaseIndexTTLMock mRecentIndexStorageMockDecreaseIndexTTL FilterNotExistWithLockFunc func(p context.Context, p1 []core.RecordID, p2 func(p []core.RecordID)) FilterNotExistWithLockCounter uint64 FilterNotExistWithLockPreCounter uint64 FilterNotExistWithLockMock mRecentIndexStorageMockFilterNotExistWithLock GetObjectsFunc func() (r map[core.RecordID]int) GetObjectsCounter uint64 GetObjectsPreCounter uint64 GetObjectsMock mRecentIndexStorageMockGetObjects // contains filtered or unexported fields }
RecentIndexStorageMock implements github.com/insolar/insolar/ledger/recentstorage.RecentIndexStorage
func NewRecentIndexStorageMock ¶ added in v0.8.0
func NewRecentIndexStorageMock(t minimock.Tester) *RecentIndexStorageMock
NewRecentIndexStorageMock returns a mock for github.com/insolar/insolar/ledger/recentstorage.RecentIndexStorage
func (*RecentIndexStorageMock) AddObject ¶ added in v0.8.0
func (m *RecentIndexStorageMock) AddObject(p context.Context, p1 core.RecordID)
AddObject implements github.com/insolar/insolar/ledger/recentstorage.RecentIndexStorage interface
func (*RecentIndexStorageMock) AddObjectFinished ¶ added in v0.8.0
func (m *RecentIndexStorageMock) AddObjectFinished() bool
AddObjectFinished returns true if mock invocations count is ok
func (*RecentIndexStorageMock) AddObjectMinimockCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) AddObjectMinimockCounter() uint64
AddObjectMinimockCounter returns a count of RecentIndexStorageMock.AddObjectFunc invocations
func (*RecentIndexStorageMock) AddObjectMinimockPreCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) AddObjectMinimockPreCounter() uint64
AddObjectMinimockPreCounter returns the value of RecentIndexStorageMock.AddObject invocations
func (*RecentIndexStorageMock) AddObjectWithTLL ¶ added in v0.8.0
AddObjectWithTLL implements github.com/insolar/insolar/ledger/recentstorage.RecentIndexStorage interface
func (*RecentIndexStorageMock) AddObjectWithTLLFinished ¶ added in v0.8.0
func (m *RecentIndexStorageMock) AddObjectWithTLLFinished() bool
AddObjectWithTLLFinished returns true if mock invocations count is ok
func (*RecentIndexStorageMock) AddObjectWithTLLMinimockCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) AddObjectWithTLLMinimockCounter() uint64
AddObjectWithTLLMinimockCounter returns a count of RecentIndexStorageMock.AddObjectWithTLLFunc invocations
func (*RecentIndexStorageMock) AddObjectWithTLLMinimockPreCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) AddObjectWithTLLMinimockPreCounter() uint64
AddObjectWithTLLMinimockPreCounter returns the value of RecentIndexStorageMock.AddObjectWithTLL invocations
func (*RecentIndexStorageMock) AllMocksCalled ¶ added in v0.8.0
func (m *RecentIndexStorageMock) 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 (*RecentIndexStorageMock) CheckMocksCalled ¶ added in v0.8.0
func (m *RecentIndexStorageMock) 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 (*RecentIndexStorageMock) DecreaseIndexTTL ¶ added in v0.8.0
func (m *RecentIndexStorageMock) DecreaseIndexTTL(p context.Context) (r []core.RecordID)
DecreaseIndexTTL implements github.com/insolar/insolar/ledger/recentstorage.RecentIndexStorage interface
func (*RecentIndexStorageMock) DecreaseIndexTTLFinished ¶ added in v0.8.0
func (m *RecentIndexStorageMock) DecreaseIndexTTLFinished() bool
DecreaseIndexTTLFinished returns true if mock invocations count is ok
func (*RecentIndexStorageMock) DecreaseIndexTTLMinimockCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) DecreaseIndexTTLMinimockCounter() uint64
DecreaseIndexTTLMinimockCounter returns a count of RecentIndexStorageMock.DecreaseIndexTTLFunc invocations
func (*RecentIndexStorageMock) DecreaseIndexTTLMinimockPreCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) DecreaseIndexTTLMinimockPreCounter() uint64
DecreaseIndexTTLMinimockPreCounter returns the value of RecentIndexStorageMock.DecreaseIndexTTL invocations
func (*RecentIndexStorageMock) FilterNotExistWithLock ¶ added in v0.8.0
func (m *RecentIndexStorageMock) FilterNotExistWithLock(p context.Context, p1 []core.RecordID, p2 func(p []core.RecordID))
FilterNotExistWithLock implements github.com/insolar/insolar/ledger/recentstorage.RecentIndexStorage interface
func (*RecentIndexStorageMock) FilterNotExistWithLockFinished ¶ added in v0.8.0
func (m *RecentIndexStorageMock) FilterNotExistWithLockFinished() bool
FilterNotExistWithLockFinished returns true if mock invocations count is ok
func (*RecentIndexStorageMock) FilterNotExistWithLockMinimockCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) FilterNotExistWithLockMinimockCounter() uint64
FilterNotExistWithLockMinimockCounter returns a count of RecentIndexStorageMock.FilterNotExistWithLockFunc invocations
func (*RecentIndexStorageMock) FilterNotExistWithLockMinimockPreCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) FilterNotExistWithLockMinimockPreCounter() uint64
FilterNotExistWithLockMinimockPreCounter returns the value of RecentIndexStorageMock.FilterNotExistWithLock invocations
func (*RecentIndexStorageMock) Finish ¶ added in v0.8.0
func (m *RecentIndexStorageMock) 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 (*RecentIndexStorageMock) GetObjects ¶ added in v0.8.0
func (m *RecentIndexStorageMock) GetObjects() (r map[core.RecordID]int)
GetObjects implements github.com/insolar/insolar/ledger/recentstorage.RecentIndexStorage interface
func (*RecentIndexStorageMock) GetObjectsFinished ¶ added in v0.8.0
func (m *RecentIndexStorageMock) GetObjectsFinished() bool
GetObjectsFinished returns true if mock invocations count is ok
func (*RecentIndexStorageMock) GetObjectsMinimockCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) GetObjectsMinimockCounter() uint64
GetObjectsMinimockCounter returns a count of RecentIndexStorageMock.GetObjectsFunc invocations
func (*RecentIndexStorageMock) GetObjectsMinimockPreCounter ¶ added in v0.8.0
func (m *RecentIndexStorageMock) GetObjectsMinimockPreCounter() uint64
GetObjectsMinimockPreCounter returns the value of RecentIndexStorageMock.GetObjects invocations
func (*RecentIndexStorageMock) MinimockFinish ¶ added in v0.8.0
func (m *RecentIndexStorageMock) MinimockFinish()
MinimockFinish checks that all mocked methods of the interface have been called at least once
func (*RecentIndexStorageMock) MinimockWait ¶ added in v0.8.0
func (m *RecentIndexStorageMock) MinimockWait(timeout time.Duration)
MinimockWait waits for all mocked methods to be called at least once this method is called by minimock.Controller
func (*RecentIndexStorageMock) ValidateCallCounters ¶ added in v0.8.0
func (m *RecentIndexStorageMock) 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 (*RecentIndexStorageMock) Wait ¶ added in v0.8.0
func (m *RecentIndexStorageMock) 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 RecentIndexStorageMockAddObjectExpectation ¶ added in v0.8.0
type RecentIndexStorageMockAddObjectExpectation struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockAddObjectInput ¶ added in v0.8.0
type RecentIndexStorageMockAddObjectInput struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockAddObjectWithTLLExpectation ¶ added in v0.8.0
type RecentIndexStorageMockAddObjectWithTLLExpectation struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockAddObjectWithTLLInput ¶ added in v0.8.0
type RecentIndexStorageMockAddObjectWithTLLInput struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockDecreaseIndexTTLExpectation ¶ added in v0.8.0
type RecentIndexStorageMockDecreaseIndexTTLExpectation struct {
// contains filtered or unexported fields
}
func (*RecentIndexStorageMockDecreaseIndexTTLExpectation) Return ¶ added in v0.8.0
func (e *RecentIndexStorageMockDecreaseIndexTTLExpectation) Return(r []core.RecordID)
type RecentIndexStorageMockDecreaseIndexTTLInput ¶ added in v0.8.0
type RecentIndexStorageMockDecreaseIndexTTLInput struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockDecreaseIndexTTLResult ¶ added in v0.8.0
type RecentIndexStorageMockDecreaseIndexTTLResult struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockFilterNotExistWithLockExpectation ¶ added in v0.8.0
type RecentIndexStorageMockFilterNotExistWithLockExpectation struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockFilterNotExistWithLockInput ¶ added in v0.8.0
type RecentIndexStorageMockFilterNotExistWithLockInput struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockGetObjectsExpectation ¶ added in v0.8.0
type RecentIndexStorageMockGetObjectsExpectation struct {
// contains filtered or unexported fields
}
type RecentIndexStorageMockGetObjectsResult ¶ added in v0.8.0
type RecentIndexStorageMockGetObjectsResult struct {
// contains filtered or unexported fields
}
type RecentStorageProvider ¶ added in v0.8.0
type RecentStorageProvider struct { DefaultTTL int // contains filtered or unexported fields }
RecentStorageProvider provides a recent storage for jet
func NewRecentStorageProvider ¶ added in v0.8.0
func NewRecentStorageProvider(defaultTTL int) *RecentStorageProvider
NewRecentStorageProvider creates new provider
func (*RecentStorageProvider) CloneIndexStorage ¶ added in v0.8.0
func (p *RecentStorageProvider) CloneIndexStorage(ctx context.Context, fromJetID, toJetID core.RecordID)
CloneIndexStorage clones indexes from one jet to another one
func (*RecentStorageProvider) ClonePendingStorage ¶ added in v0.8.0
func (p *RecentStorageProvider) ClonePendingStorage(ctx context.Context, fromJetID, toJetID core.RecordID)
ClonePendingStorage clones pending requests from one jet to another one
func (*RecentStorageProvider) Count ¶ added in v0.8.0
func (p *RecentStorageProvider) Count() int
Count returns count of pendings in all storages
func (*RecentStorageProvider) DecreaseIndexesTTL ¶ added in v0.8.0
func (p *RecentStorageProvider) DecreaseIndexesTTL(ctx context.Context) map[core.RecordID][]core.RecordID
DecreaseIndexesTTL decrease ttl of all indexes in all storages If storage contains indexes with zero ttl, they are removed from storage and returned to a caller If there are no indexes with ttl more then 0, storage is removed
func (*RecentStorageProvider) GetIndexStorage ¶ added in v0.8.0
func (p *RecentStorageProvider) GetIndexStorage(ctx context.Context, jetID core.RecordID) RecentIndexStorage
GetIndexStorage returns a recent indexes for a specific jet
func (*RecentStorageProvider) GetPendingStorage ¶ added in v0.8.0
func (p *RecentStorageProvider) GetPendingStorage(ctx context.Context, jetID core.RecordID) PendingStorage
GetPendingStorage returns pendings for a specific jet
func (*RecentStorageProvider) RemovePendingStorage ¶ added in v0.8.0
func (p *RecentStorageProvider) RemovePendingStorage(ctx context.Context, id core.RecordID)
RemovePendingStorage removes pending requests for a specific jet from provider If there is a reference to RecentIndexStorage somewhere, it won't be affected