Documentation ¶
Overview ¶
executor contains internal business logic object for light executor.
Index ¶
- Variables
- type ChannelWaiter
- func (w *ChannelWaiter) CloseAllUntil(ctx context.Context, pulse insolar.PulseNumber)
- func (w *ChannelWaiter) IsReceived(ctx context.Context, jetID insolar.JetID, pn insolar.PulseNumber) bool
- func (w *ChannelWaiter) Unlock(ctx context.Context, pulse insolar.PulseNumber, jetID insolar.JetID) error
- func (w *ChannelWaiter) Wait(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber) error
- type Cleaner
- type CleanerMock
- func (m *CleanerMock) MinimockFinish()
- func (m *CleanerMock) MinimockNotifyAboutPulseDone() bool
- func (m *CleanerMock) MinimockNotifyAboutPulseInspect()
- func (m *CleanerMock) MinimockStopDone() bool
- func (m *CleanerMock) MinimockStopInspect()
- func (m *CleanerMock) MinimockWait(timeout mm_time.Duration)
- func (mmNotifyAboutPulse *CleanerMock) NotifyAboutPulse(ctx context.Context, pn insolar.PulseNumber)
- func (mmNotifyAboutPulse *CleanerMock) NotifyAboutPulseAfterCounter() uint64
- func (mmNotifyAboutPulse *CleanerMock) NotifyAboutPulseBeforeCounter() uint64
- func (mmStop *CleanerMock) Stop()
- func (mmStop *CleanerMock) StopAfterCounter() uint64
- func (mmStop *CleanerMock) StopBeforeCounter() uint64
- type CleanerMockNotifyAboutPulseExpectation
- type CleanerMockNotifyAboutPulseParams
- type CleanerMockStopExpectation
- type DetachedNotifier
- type DetachedNotifierDefault
- type DetachedNotifierMock
- func (m *DetachedNotifierMock) MinimockFinish()
- func (m *DetachedNotifierMock) MinimockNotifyDone() bool
- func (m *DetachedNotifierMock) MinimockNotifyInspect()
- func (m *DetachedNotifierMock) MinimockWait(timeout mm_time.Duration)
- func (mmNotify *DetachedNotifierMock) Notify(ctx context.Context, openedRequests []record.CompositeFilamentRecord, ...)
- func (mmNotify *DetachedNotifierMock) NotifyAfterCounter() uint64
- func (mmNotify *DetachedNotifierMock) NotifyBeforeCounter() uint64
- type DetachedNotifierMockNotifyExpectation
- type DetachedNotifierMockNotifyParams
- type FilamentCalculator
- type FilamentCalculatorDefault
- func (c *FilamentCalculatorDefault) Clear(objID insolar.ID)
- func (c *FilamentCalculatorDefault) OpenedRequests(ctx context.Context, pulse insolar.PulseNumber, objectID insolar.ID, ...) ([]record.CompositeFilamentRecord, error)
- func (c *FilamentCalculatorDefault) RequestDuplicate(ctx context.Context, objectID, requestID insolar.ID, request record.Request) (*record.CompositeFilamentRecord, *record.CompositeFilamentRecord, error)
- func (c *FilamentCalculatorDefault) RequestInfo(ctx context.Context, objectID insolar.ID, requestID insolar.ID, ...) (*record.CompositeFilamentRecord, *record.CompositeFilamentRecord, error)
- func (c *FilamentCalculatorDefault) Requests(ctx context.Context, objectID, from insolar.ID, readUntil insolar.PulseNumber) ([]record.CompositeFilamentRecord, error)
- func (c *FilamentCalculatorDefault) ResultDuplicate(ctx context.Context, objectID, resultID insolar.ID, result record.Result) (*record.CompositeFilamentRecord, error)
- type FilamentCalculatorMock
- func (m *FilamentCalculatorMock) MinimockFinish()
- func (m *FilamentCalculatorMock) MinimockOpenedRequestsDone() bool
- func (m *FilamentCalculatorMock) MinimockOpenedRequestsInspect()
- func (m *FilamentCalculatorMock) MinimockRequestDuplicateDone() bool
- func (m *FilamentCalculatorMock) MinimockRequestDuplicateInspect()
- func (m *FilamentCalculatorMock) MinimockRequestInfoDone() bool
- func (m *FilamentCalculatorMock) MinimockRequestInfoInspect()
- func (m *FilamentCalculatorMock) MinimockRequestsDone() bool
- func (m *FilamentCalculatorMock) MinimockRequestsInspect()
- func (m *FilamentCalculatorMock) MinimockResultDuplicateDone() bool
- func (m *FilamentCalculatorMock) MinimockResultDuplicateInspect()
- func (m *FilamentCalculatorMock) MinimockWait(timeout mm_time.Duration)
- func (mmOpenedRequests *FilamentCalculatorMock) OpenedRequests(ctx context.Context, pulse insolar.PulseNumber, objectID insolar.ID, ...) (ca1 []record.CompositeFilamentRecord, err error)
- func (mmOpenedRequests *FilamentCalculatorMock) OpenedRequestsAfterCounter() uint64
- func (mmOpenedRequests *FilamentCalculatorMock) OpenedRequestsBeforeCounter() uint64
- func (mmRequestDuplicate *FilamentCalculatorMock) RequestDuplicate(ctx context.Context, objectID insolar.ID, requestID insolar.ID, ...) (foundRequest *record.CompositeFilamentRecord, ...)
- func (mmRequestDuplicate *FilamentCalculatorMock) RequestDuplicateAfterCounter() uint64
- func (mmRequestDuplicate *FilamentCalculatorMock) RequestDuplicateBeforeCounter() uint64
- func (mmRequestInfo *FilamentCalculatorMock) RequestInfo(ctx context.Context, objectID insolar.ID, requestID insolar.ID, ...) (foundRequest *record.CompositeFilamentRecord, ...)
- func (mmRequestInfo *FilamentCalculatorMock) RequestInfoAfterCounter() uint64
- func (mmRequestInfo *FilamentCalculatorMock) RequestInfoBeforeCounter() uint64
- func (mmRequests *FilamentCalculatorMock) Requests(ctx context.Context, objectID insolar.ID, from insolar.ID, ...) (ca1 []record.CompositeFilamentRecord, err error)
- func (mmRequests *FilamentCalculatorMock) RequestsAfterCounter() uint64
- func (mmRequests *FilamentCalculatorMock) RequestsBeforeCounter() uint64
- func (mmResultDuplicate *FilamentCalculatorMock) ResultDuplicate(ctx context.Context, objectID insolar.ID, resultID insolar.ID, ...) (foundResult *record.CompositeFilamentRecord, err error)
- func (mmResultDuplicate *FilamentCalculatorMock) ResultDuplicateAfterCounter() uint64
- func (mmResultDuplicate *FilamentCalculatorMock) ResultDuplicateBeforeCounter() uint64
- type FilamentCalculatorMockOpenedRequestsExpectation
- type FilamentCalculatorMockOpenedRequestsParams
- type FilamentCalculatorMockOpenedRequestsResults
- type FilamentCalculatorMockRequestDuplicateExpectation
- type FilamentCalculatorMockRequestDuplicateParams
- type FilamentCalculatorMockRequestDuplicateResults
- type FilamentCalculatorMockRequestInfoExpectation
- type FilamentCalculatorMockRequestInfoParams
- type FilamentCalculatorMockRequestInfoResults
- type FilamentCalculatorMockRequestsExpectation
- type FilamentCalculatorMockRequestsParams
- type FilamentCalculatorMockRequestsResults
- type FilamentCalculatorMockResultDuplicateExpectation
- type FilamentCalculatorMockResultDuplicateParams
- type FilamentCalculatorMockResultDuplicateResults
- type FilamentCleaner
- type FilamentCleanerMock
- func (mmClear *FilamentCleanerMock) Clear(objID insolar.ID)
- func (mmClear *FilamentCleanerMock) ClearAfterCounter() uint64
- func (mmClear *FilamentCleanerMock) ClearBeforeCounter() uint64
- func (m *FilamentCleanerMock) MinimockClearDone() bool
- func (m *FilamentCleanerMock) MinimockClearInspect()
- func (m *FilamentCleanerMock) MinimockFinish()
- func (m *FilamentCleanerMock) MinimockWait(timeout mm_time.Duration)
- type FilamentCleanerMockClearExpectation
- type FilamentCleanerMockClearParams
- type HotDataStatusChecker
- type HotSender
- type HotSenderDefault
- type JetCalculator
- type JetCalculatorDefault
- type JetCalculatorMock
- func (mmMineForPulse *JetCalculatorMock) MineForPulse(ctx context.Context, pn insolar.PulseNumber) (ja1 []insolar.JetID, err error)
- func (mmMineForPulse *JetCalculatorMock) MineForPulseAfterCounter() uint64
- func (mmMineForPulse *JetCalculatorMock) MineForPulseBeforeCounter() uint64
- func (m *JetCalculatorMock) MinimockFinish()
- func (m *JetCalculatorMock) MinimockMineForPulseDone() bool
- func (m *JetCalculatorMock) MinimockMineForPulseInspect()
- func (m *JetCalculatorMock) MinimockWait(timeout mm_time.Duration)
- type JetCalculatorMockMineForPulseExpectation
- type JetCalculatorMockMineForPulseParams
- type JetCalculatorMockMineForPulseResults
- type JetFetcher
- type JetFetcherMock
- func (mmFetch *JetFetcherMock) Fetch(ctx context.Context, target insolar.ID, pulse insolar.PulseNumber) (ip1 *insolar.ID, err error)
- func (mmFetch *JetFetcherMock) FetchAfterCounter() uint64
- func (mmFetch *JetFetcherMock) FetchBeforeCounter() uint64
- func (m *JetFetcherMock) MinimockFetchDone() bool
- func (m *JetFetcherMock) MinimockFetchInspect()
- func (m *JetFetcherMock) MinimockFinish()
- func (m *JetFetcherMock) MinimockReleaseDone() bool
- func (m *JetFetcherMock) MinimockReleaseInspect()
- func (m *JetFetcherMock) MinimockWait(timeout mm_time.Duration)
- func (mmRelease *JetFetcherMock) Release(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber)
- func (mmRelease *JetFetcherMock) ReleaseAfterCounter() uint64
- func (mmRelease *JetFetcherMock) ReleaseBeforeCounter() uint64
- type JetFetcherMockFetchExpectation
- type JetFetcherMockFetchParams
- type JetFetcherMockFetchResults
- type JetFetcherMockReleaseExpectation
- type JetFetcherMockReleaseParams
- type JetInfo
- type JetReleaser
- type JetReleaserMock
- func (mmCloseAllUntil *JetReleaserMock) CloseAllUntil(ctx context.Context, pulse insolar.PulseNumber)
- func (mmCloseAllUntil *JetReleaserMock) CloseAllUntilAfterCounter() uint64
- func (mmCloseAllUntil *JetReleaserMock) CloseAllUntilBeforeCounter() uint64
- func (m *JetReleaserMock) MinimockCloseAllUntilDone() bool
- func (m *JetReleaserMock) MinimockCloseAllUntilInspect()
- func (m *JetReleaserMock) MinimockFinish()
- func (m *JetReleaserMock) MinimockUnlockDone() bool
- func (m *JetReleaserMock) MinimockUnlockInspect()
- func (m *JetReleaserMock) MinimockWait(timeout mm_time.Duration)
- func (mmUnlock *JetReleaserMock) Unlock(ctx context.Context, pulse insolar.PulseNumber, jetID insolar.JetID) (err error)
- func (mmUnlock *JetReleaserMock) UnlockAfterCounter() uint64
- func (mmUnlock *JetReleaserMock) UnlockBeforeCounter() uint64
- type JetReleaserMockCloseAllUntilExpectation
- type JetReleaserMockCloseAllUntilParams
- type JetReleaserMockUnlockExpectation
- type JetReleaserMockUnlockParams
- type JetReleaserMockUnlockResults
- type JetSplitter
- type JetSplitterDefault
- type JetWaiter
- type JetWaiterMock
- func (m *JetWaiterMock) MinimockFinish()
- func (m *JetWaiterMock) MinimockWait(timeout mm_time.Duration)
- func (m *JetWaiterMock) MinimockWaitDone() bool
- func (m *JetWaiterMock) MinimockWaitInspect()
- func (mmWait *JetWaiterMock) Wait(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber) (err error)
- func (mmWait *JetWaiterMock) WaitAfterCounter() uint64
- func (mmWait *JetWaiterMock) WaitBeforeCounter() uint64
- type JetWaiterMockWaitExpectation
- type JetWaiterMockWaitParams
- type JetWaiterMockWaitResults
- type LightCleaner
- type LightReplicator
- type LightReplicatorDefault
- type PulseManager
- type RequestChecker
- type RequestCheckerDefault
- type RequestCheckerMock
- func (mmCheckRequest *RequestCheckerMock) CheckRequest(ctx context.Context, requestID insolar.ID, request record.Request) (err error)
- func (mmCheckRequest *RequestCheckerMock) CheckRequestAfterCounter() uint64
- func (mmCheckRequest *RequestCheckerMock) CheckRequestBeforeCounter() uint64
- func (m *RequestCheckerMock) MinimockCheckRequestDone() bool
- func (m *RequestCheckerMock) MinimockCheckRequestInspect()
- func (m *RequestCheckerMock) MinimockFinish()
- func (m *RequestCheckerMock) MinimockWait(timeout mm_time.Duration)
- type RequestCheckerMockCheckRequestExpectation
- type RequestCheckerMockCheckRequestParams
- type RequestCheckerMockCheckRequestResults
- type StateIniter
- type StateIniterDefault
- type StateIniterMock
- func (m *StateIniterMock) MinimockFinish()
- func (m *StateIniterMock) MinimockPrepareStateDone() bool
- func (m *StateIniterMock) MinimockPrepareStateInspect()
- func (m *StateIniterMock) MinimockWait(timeout mm_time.Duration)
- func (mmPrepareState *StateIniterMock) PrepareState(ctx context.Context, pulse insolar.PulseNumber) (justJoined bool, jets []insolar.JetID, err error)
- func (mmPrepareState *StateIniterMock) PrepareStateAfterCounter() uint64
- func (mmPrepareState *StateIniterMock) PrepareStateBeforeCounter() uint64
- type StateIniterMockPrepareStateExpectation
- type StateIniterMockPrepareStateParams
- type StateIniterMockPrepareStateResults
- type WriteAccessor
- type WriteAccessorMock
- func (mmBegin *WriteAccessorMock) Begin(ctx context.Context, p1 insolar.PulseNumber) (done func(), err error)
- func (mmBegin *WriteAccessorMock) BeginAfterCounter() uint64
- func (mmBegin *WriteAccessorMock) BeginBeforeCounter() uint64
- func (m *WriteAccessorMock) MinimockBeginDone() bool
- func (m *WriteAccessorMock) MinimockBeginInspect()
- func (m *WriteAccessorMock) MinimockFinish()
- func (m *WriteAccessorMock) MinimockWait(timeout mm_time.Duration)
- type WriteAccessorMockBeginExpectation
- type WriteAccessorMockBeginParams
- type WriteAccessorMockBeginResults
- type WriteController
- type WriteManager
- type WriteManagerMock
- func (mmCloseAndWait *WriteManagerMock) CloseAndWait(ctx context.Context, p1 insolar.PulseNumber) (err error)
- func (mmCloseAndWait *WriteManagerMock) CloseAndWaitAfterCounter() uint64
- func (mmCloseAndWait *WriteManagerMock) CloseAndWaitBeforeCounter() uint64
- func (m *WriteManagerMock) MinimockCloseAndWaitDone() bool
- func (m *WriteManagerMock) MinimockCloseAndWaitInspect()
- func (m *WriteManagerMock) MinimockFinish()
- func (m *WriteManagerMock) MinimockOpenDone() bool
- func (m *WriteManagerMock) MinimockOpenInspect()
- func (m *WriteManagerMock) MinimockWait(timeout mm_time.Duration)
- func (mmOpen *WriteManagerMock) Open(ctx context.Context, p1 insolar.PulseNumber) (err error)
- func (mmOpen *WriteManagerMock) OpenAfterCounter() uint64
- func (mmOpen *WriteManagerMock) OpenBeforeCounter() uint64
- type WriteManagerMockCloseAndWaitExpectation
- type WriteManagerMockCloseAndWaitParams
- type WriteManagerMockCloseAndWaitResults
- type WriteManagerMockOpenExpectation
- type WriteManagerMockOpenParams
- type WriteManagerMockOpenResults
Constants ¶
This section is empty.
Variables ¶
var ( ErrWaiterNotLocked = errors.New("unlocked waiter unlock attempt") ErrWriteClosed = errors.New("requested pulse is closed for writing") )
Functions ¶
This section is empty.
Types ¶
type ChannelWaiter ¶
type ChannelWaiter struct {
// contains filtered or unexported fields
}
ChannelWaiter implements methods for locking and unlocking a certain jet id.
func NewChannelWaiter ¶
func NewChannelWaiter() *ChannelWaiter
NewChannelWaiter creates new waiter instance.
func (*ChannelWaiter) CloseAllUntil ¶
func (w *ChannelWaiter) CloseAllUntil(ctx context.Context, pulse insolar.PulseNumber)
CloseAllUntil raises timeouts on all waiters until pulse.
func (*ChannelWaiter) IsReceived ¶
func (w *ChannelWaiter) IsReceived(ctx context.Context, jetID insolar.JetID, pn insolar.PulseNumber) bool
func (*ChannelWaiter) Unlock ¶
func (w *ChannelWaiter) Unlock(ctx context.Context, pulse insolar.PulseNumber, jetID insolar.JetID) error
Unlock raises hotDataChannel
func (*ChannelWaiter) Wait ¶
func (w *ChannelWaiter) Wait(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber) error
Wait waits for the raising one of two channels. If hotDataChannel or timeoutChannel was raised, the method returns error Either nil or ErrHotDataTimeout
type Cleaner ¶
type Cleaner interface { // NotifyAboutPulse notifies a component about a pulse NotifyAboutPulse(ctx context.Context, pn insolar.PulseNumber) Stop() }
Cleaner is an interface that represents a cleaner-component It's supposed, that all the process of cleaning data from LME will be doing by it
type CleanerMock ¶
type CleanerMock struct { NotifyAboutPulseMock mCleanerMockNotifyAboutPulse StopMock mCleanerMockStop // contains filtered or unexported fields }
CleanerMock implements Cleaner
func NewCleanerMock ¶
func NewCleanerMock(t minimock.Tester) *CleanerMock
NewCleanerMock returns a mock for Cleaner
func (*CleanerMock) MinimockFinish ¶
func (m *CleanerMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*CleanerMock) MinimockNotifyAboutPulseDone ¶
func (m *CleanerMock) MinimockNotifyAboutPulseDone() bool
MinimockNotifyAboutPulseDone returns true if the count of the NotifyAboutPulse invocations corresponds the number of defined expectations
func (*CleanerMock) MinimockNotifyAboutPulseInspect ¶
func (m *CleanerMock) MinimockNotifyAboutPulseInspect()
MinimockNotifyAboutPulseInspect logs each unmet expectation
func (*CleanerMock) MinimockStopDone ¶
func (m *CleanerMock) MinimockStopDone() bool
MinimockStopDone returns true if the count of the Stop invocations corresponds the number of defined expectations
func (*CleanerMock) MinimockStopInspect ¶
func (m *CleanerMock) MinimockStopInspect()
MinimockStopInspect logs each unmet expectation
func (*CleanerMock) MinimockWait ¶
func (m *CleanerMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*CleanerMock) NotifyAboutPulse ¶
func (mmNotifyAboutPulse *CleanerMock) NotifyAboutPulse(ctx context.Context, pn insolar.PulseNumber)
NotifyAboutPulse implements Cleaner
func (*CleanerMock) NotifyAboutPulseAfterCounter ¶
func (mmNotifyAboutPulse *CleanerMock) NotifyAboutPulseAfterCounter() uint64
NotifyAboutPulseAfterCounter returns a count of finished CleanerMock.NotifyAboutPulse invocations
func (*CleanerMock) NotifyAboutPulseBeforeCounter ¶
func (mmNotifyAboutPulse *CleanerMock) NotifyAboutPulseBeforeCounter() uint64
NotifyAboutPulseBeforeCounter returns a count of CleanerMock.NotifyAboutPulse invocations
func (*CleanerMock) StopAfterCounter ¶
func (mmStop *CleanerMock) StopAfterCounter() uint64
StopAfterCounter returns a count of finished CleanerMock.Stop invocations
func (*CleanerMock) StopBeforeCounter ¶
func (mmStop *CleanerMock) StopBeforeCounter() uint64
StopBeforeCounter returns a count of CleanerMock.Stop invocations
type CleanerMockNotifyAboutPulseExpectation ¶
type CleanerMockNotifyAboutPulseExpectation struct { Counter uint64 // contains filtered or unexported fields }
CleanerMockNotifyAboutPulseExpectation specifies expectation struct of the Cleaner.NotifyAboutPulse
type CleanerMockNotifyAboutPulseParams ¶
type CleanerMockNotifyAboutPulseParams struct {
// contains filtered or unexported fields
}
CleanerMockNotifyAboutPulseParams contains parameters of the Cleaner.NotifyAboutPulse
type CleanerMockStopExpectation ¶
type CleanerMockStopExpectation struct { Counter uint64 // contains filtered or unexported fields }
CleanerMockStopExpectation specifies expectation struct of the Cleaner.Stop
type DetachedNotifier ¶ added in v0.9.5
type DetachedNotifierDefault ¶ added in v0.9.5
type DetachedNotifierDefault struct {
// contains filtered or unexported fields
}
func NewDetachedNotifierDefault ¶ added in v0.9.5
func NewDetachedNotifierDefault( sender bus.Sender, ) *DetachedNotifierDefault
func (*DetachedNotifierDefault) Notify ¶ added in v0.9.5
func (p *DetachedNotifierDefault) Notify( ctx context.Context, openedRequests []record.CompositeFilamentRecord, objectID insolar.ID, closedRequestID insolar.ID, )
Notify sends notifications about detached requests that are ready for execution.
type DetachedNotifierMock ¶ added in v0.9.5
type DetachedNotifierMock struct { NotifyMock mDetachedNotifierMockNotify // contains filtered or unexported fields }
DetachedNotifierMock implements DetachedNotifier
func NewDetachedNotifierMock ¶ added in v0.9.5
func NewDetachedNotifierMock(t minimock.Tester) *DetachedNotifierMock
NewDetachedNotifierMock returns a mock for DetachedNotifier
func (*DetachedNotifierMock) MinimockFinish ¶ added in v0.9.5
func (m *DetachedNotifierMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*DetachedNotifierMock) MinimockNotifyDone ¶ added in v0.9.5
func (m *DetachedNotifierMock) MinimockNotifyDone() bool
MinimockNotifyDone returns true if the count of the Notify invocations corresponds the number of defined expectations
func (*DetachedNotifierMock) MinimockNotifyInspect ¶ added in v0.9.5
func (m *DetachedNotifierMock) MinimockNotifyInspect()
MinimockNotifyInspect logs each unmet expectation
func (*DetachedNotifierMock) MinimockWait ¶ added in v0.9.5
func (m *DetachedNotifierMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*DetachedNotifierMock) Notify ¶ added in v0.9.5
func (mmNotify *DetachedNotifierMock) Notify(ctx context.Context, openedRequests []record.CompositeFilamentRecord, objectID insolar.ID, closedRequestID insolar.ID)
Notify implements DetachedNotifier
func (*DetachedNotifierMock) NotifyAfterCounter ¶ added in v0.9.5
func (mmNotify *DetachedNotifierMock) NotifyAfterCounter() uint64
NotifyAfterCounter returns a count of finished DetachedNotifierMock.Notify invocations
func (*DetachedNotifierMock) NotifyBeforeCounter ¶ added in v0.9.5
func (mmNotify *DetachedNotifierMock) NotifyBeforeCounter() uint64
NotifyBeforeCounter returns a count of DetachedNotifierMock.Notify invocations
type DetachedNotifierMockNotifyExpectation ¶ added in v0.9.5
type DetachedNotifierMockNotifyExpectation struct { Counter uint64 // contains filtered or unexported fields }
DetachedNotifierMockNotifyExpectation specifies expectation struct of the DetachedNotifier.Notify
type DetachedNotifierMockNotifyParams ¶ added in v0.9.5
type DetachedNotifierMockNotifyParams struct {
// contains filtered or unexported fields
}
DetachedNotifierMockNotifyParams contains parameters of the DetachedNotifier.Notify
type FilamentCalculator ¶
type FilamentCalculator interface { // Requests returns request records for objectID's chain, starts from provided id until provided pulse. // TODO: remove calcPulse param Requests( ctx context.Context, objectID, from insolar.ID, readUntil insolar.PulseNumber, ) ([]record.CompositeFilamentRecord, error) // OpenedRequests returns all opened requests of object for provided pulse. OpenedRequests( ctx context.Context, pulse insolar.PulseNumber, objectID insolar.ID, pendingOnly bool, ) ([]record.CompositeFilamentRecord, error) // RequestDuplicate searches two records on objectID chain: // First one with same ID as requestID param. // Second is the Result record Request field of which equals requestID param. // Uses request parameter to check if Reason is not empty and to set pulse for scan limit. RequestDuplicate( ctx context.Context, objectID, requestID insolar.ID, request record.Request, ) ( foundRequest *record.CompositeFilamentRecord, foundResult *record.CompositeFilamentRecord, err error, ) ResultDuplicate( ctx context.Context, objectID, resultID insolar.ID, result record.Result, ) ( foundResult *record.CompositeFilamentRecord, err error, ) // RequestInfo is searching for request and result by objectID, requestID and pulse number RequestInfo( ctx context.Context, objectID insolar.ID, requestID insolar.ID, pulse insolar.PulseNumber, ) ( foundRequest *record.CompositeFilamentRecord, foundResult *record.CompositeFilamentRecord, err error, ) }
type FilamentCalculatorDefault ¶
type FilamentCalculatorDefault struct {
// contains filtered or unexported fields
}
func NewFilamentCalculator ¶
func NewFilamentCalculator( indexes object.IndexAccessor, records object.RecordAccessor, coordinator jet.Coordinator, jetFetcher JetFetcher, sender bus.Sender, pulses pulse.Calculator, ) *FilamentCalculatorDefault
func (*FilamentCalculatorDefault) Clear ¶
func (c *FilamentCalculatorDefault) Clear(objID insolar.ID)
func (*FilamentCalculatorDefault) OpenedRequests ¶
func (c *FilamentCalculatorDefault) OpenedRequests(ctx context.Context, pulse insolar.PulseNumber, objectID insolar.ID, pendingOnly bool) ([]record.CompositeFilamentRecord, error)
func (*FilamentCalculatorDefault) RequestDuplicate ¶
func (c *FilamentCalculatorDefault) RequestDuplicate( ctx context.Context, objectID, requestID insolar.ID, request record.Request, ) (*record.CompositeFilamentRecord, *record.CompositeFilamentRecord, error)
func (*FilamentCalculatorDefault) RequestInfo ¶
func (c *FilamentCalculatorDefault) RequestInfo( ctx context.Context, objectID insolar.ID, requestID insolar.ID, pulse insolar.PulseNumber, ) ( *record.CompositeFilamentRecord, *record.CompositeFilamentRecord, error, )
func (*FilamentCalculatorDefault) Requests ¶
func (c *FilamentCalculatorDefault) Requests( ctx context.Context, objectID, from insolar.ID, readUntil insolar.PulseNumber, ) ([]record.CompositeFilamentRecord, error)
func (*FilamentCalculatorDefault) ResultDuplicate ¶
func (c *FilamentCalculatorDefault) ResultDuplicate( ctx context.Context, objectID, resultID insolar.ID, result record.Result, ) (*record.CompositeFilamentRecord, error)
type FilamentCalculatorMock ¶
type FilamentCalculatorMock struct { OpenedRequestsMock mFilamentCalculatorMockOpenedRequests RequestDuplicateMock mFilamentCalculatorMockRequestDuplicate RequestInfoMock mFilamentCalculatorMockRequestInfo RequestsMock mFilamentCalculatorMockRequests ResultDuplicateMock mFilamentCalculatorMockResultDuplicate // contains filtered or unexported fields }
FilamentCalculatorMock implements FilamentCalculator
func NewFilamentCalculatorMock ¶
func NewFilamentCalculatorMock(t minimock.Tester) *FilamentCalculatorMock
NewFilamentCalculatorMock returns a mock for FilamentCalculator
func (*FilamentCalculatorMock) MinimockFinish ¶
func (m *FilamentCalculatorMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*FilamentCalculatorMock) MinimockOpenedRequestsDone ¶
func (m *FilamentCalculatorMock) MinimockOpenedRequestsDone() bool
MinimockOpenedRequestsDone returns true if the count of the OpenedRequests invocations corresponds the number of defined expectations
func (*FilamentCalculatorMock) MinimockOpenedRequestsInspect ¶
func (m *FilamentCalculatorMock) MinimockOpenedRequestsInspect()
MinimockOpenedRequestsInspect logs each unmet expectation
func (*FilamentCalculatorMock) MinimockRequestDuplicateDone ¶
func (m *FilamentCalculatorMock) MinimockRequestDuplicateDone() bool
MinimockRequestDuplicateDone returns true if the count of the RequestDuplicate invocations corresponds the number of defined expectations
func (*FilamentCalculatorMock) MinimockRequestDuplicateInspect ¶
func (m *FilamentCalculatorMock) MinimockRequestDuplicateInspect()
MinimockRequestDuplicateInspect logs each unmet expectation
func (*FilamentCalculatorMock) MinimockRequestInfoDone ¶
func (m *FilamentCalculatorMock) MinimockRequestInfoDone() bool
MinimockRequestInfoDone returns true if the count of the RequestInfo invocations corresponds the number of defined expectations
func (*FilamentCalculatorMock) MinimockRequestInfoInspect ¶
func (m *FilamentCalculatorMock) MinimockRequestInfoInspect()
MinimockRequestInfoInspect logs each unmet expectation
func (*FilamentCalculatorMock) MinimockRequestsDone ¶
func (m *FilamentCalculatorMock) MinimockRequestsDone() bool
MinimockRequestsDone returns true if the count of the Requests invocations corresponds the number of defined expectations
func (*FilamentCalculatorMock) MinimockRequestsInspect ¶
func (m *FilamentCalculatorMock) MinimockRequestsInspect()
MinimockRequestsInspect logs each unmet expectation
func (*FilamentCalculatorMock) MinimockResultDuplicateDone ¶
func (m *FilamentCalculatorMock) MinimockResultDuplicateDone() bool
MinimockResultDuplicateDone returns true if the count of the ResultDuplicate invocations corresponds the number of defined expectations
func (*FilamentCalculatorMock) MinimockResultDuplicateInspect ¶
func (m *FilamentCalculatorMock) MinimockResultDuplicateInspect()
MinimockResultDuplicateInspect logs each unmet expectation
func (*FilamentCalculatorMock) MinimockWait ¶
func (m *FilamentCalculatorMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*FilamentCalculatorMock) OpenedRequests ¶
func (mmOpenedRequests *FilamentCalculatorMock) OpenedRequests(ctx context.Context, pulse insolar.PulseNumber, objectID insolar.ID, pendingOnly bool) (ca1 []record.CompositeFilamentRecord, err error)
OpenedRequests implements FilamentCalculator
func (*FilamentCalculatorMock) OpenedRequestsAfterCounter ¶
func (mmOpenedRequests *FilamentCalculatorMock) OpenedRequestsAfterCounter() uint64
OpenedRequestsAfterCounter returns a count of finished FilamentCalculatorMock.OpenedRequests invocations
func (*FilamentCalculatorMock) OpenedRequestsBeforeCounter ¶
func (mmOpenedRequests *FilamentCalculatorMock) OpenedRequestsBeforeCounter() uint64
OpenedRequestsBeforeCounter returns a count of FilamentCalculatorMock.OpenedRequests invocations
func (*FilamentCalculatorMock) RequestDuplicate ¶
func (mmRequestDuplicate *FilamentCalculatorMock) RequestDuplicate(ctx context.Context, objectID insolar.ID, requestID insolar.ID, request record.Request) (foundRequest *record.CompositeFilamentRecord, foundResult *record.CompositeFilamentRecord, err error)
RequestDuplicate implements FilamentCalculator
func (*FilamentCalculatorMock) RequestDuplicateAfterCounter ¶
func (mmRequestDuplicate *FilamentCalculatorMock) RequestDuplicateAfterCounter() uint64
RequestDuplicateAfterCounter returns a count of finished FilamentCalculatorMock.RequestDuplicate invocations
func (*FilamentCalculatorMock) RequestDuplicateBeforeCounter ¶
func (mmRequestDuplicate *FilamentCalculatorMock) RequestDuplicateBeforeCounter() uint64
RequestDuplicateBeforeCounter returns a count of FilamentCalculatorMock.RequestDuplicate invocations
func (*FilamentCalculatorMock) RequestInfo ¶
func (mmRequestInfo *FilamentCalculatorMock) RequestInfo(ctx context.Context, objectID insolar.ID, requestID insolar.ID, pulse insolar.PulseNumber) (foundRequest *record.CompositeFilamentRecord, foundResult *record.CompositeFilamentRecord, err error)
RequestInfo implements FilamentCalculator
func (*FilamentCalculatorMock) RequestInfoAfterCounter ¶
func (mmRequestInfo *FilamentCalculatorMock) RequestInfoAfterCounter() uint64
RequestInfoAfterCounter returns a count of finished FilamentCalculatorMock.RequestInfo invocations
func (*FilamentCalculatorMock) RequestInfoBeforeCounter ¶
func (mmRequestInfo *FilamentCalculatorMock) RequestInfoBeforeCounter() uint64
RequestInfoBeforeCounter returns a count of FilamentCalculatorMock.RequestInfo invocations
func (*FilamentCalculatorMock) Requests ¶
func (mmRequests *FilamentCalculatorMock) Requests(ctx context.Context, objectID insolar.ID, from insolar.ID, readUntil insolar.PulseNumber) (ca1 []record.CompositeFilamentRecord, err error)
Requests implements FilamentCalculator
func (*FilamentCalculatorMock) RequestsAfterCounter ¶
func (mmRequests *FilamentCalculatorMock) RequestsAfterCounter() uint64
RequestsAfterCounter returns a count of finished FilamentCalculatorMock.Requests invocations
func (*FilamentCalculatorMock) RequestsBeforeCounter ¶
func (mmRequests *FilamentCalculatorMock) RequestsBeforeCounter() uint64
RequestsBeforeCounter returns a count of FilamentCalculatorMock.Requests invocations
func (*FilamentCalculatorMock) ResultDuplicate ¶
func (mmResultDuplicate *FilamentCalculatorMock) ResultDuplicate(ctx context.Context, objectID insolar.ID, resultID insolar.ID, result record.Result) (foundResult *record.CompositeFilamentRecord, err error)
ResultDuplicate implements FilamentCalculator
func (*FilamentCalculatorMock) ResultDuplicateAfterCounter ¶
func (mmResultDuplicate *FilamentCalculatorMock) ResultDuplicateAfterCounter() uint64
ResultDuplicateAfterCounter returns a count of finished FilamentCalculatorMock.ResultDuplicate invocations
func (*FilamentCalculatorMock) ResultDuplicateBeforeCounter ¶
func (mmResultDuplicate *FilamentCalculatorMock) ResultDuplicateBeforeCounter() uint64
ResultDuplicateBeforeCounter returns a count of FilamentCalculatorMock.ResultDuplicate invocations
type FilamentCalculatorMockOpenedRequestsExpectation ¶
type FilamentCalculatorMockOpenedRequestsExpectation struct { Counter uint64 // contains filtered or unexported fields }
FilamentCalculatorMockOpenedRequestsExpectation specifies expectation struct of the FilamentCalculator.OpenedRequests
func (*FilamentCalculatorMockOpenedRequestsExpectation) Then ¶
func (e *FilamentCalculatorMockOpenedRequestsExpectation) Then(ca1 []record.CompositeFilamentRecord, err error) *FilamentCalculatorMock
Then sets up FilamentCalculator.OpenedRequests return parameters for the expectation previously defined by the When method
type FilamentCalculatorMockOpenedRequestsParams ¶
type FilamentCalculatorMockOpenedRequestsParams struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockOpenedRequestsParams contains parameters of the FilamentCalculator.OpenedRequests
type FilamentCalculatorMockOpenedRequestsResults ¶
type FilamentCalculatorMockOpenedRequestsResults struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockOpenedRequestsResults contains results of the FilamentCalculator.OpenedRequests
type FilamentCalculatorMockRequestDuplicateExpectation ¶
type FilamentCalculatorMockRequestDuplicateExpectation struct { Counter uint64 // contains filtered or unexported fields }
FilamentCalculatorMockRequestDuplicateExpectation specifies expectation struct of the FilamentCalculator.RequestDuplicate
func (*FilamentCalculatorMockRequestDuplicateExpectation) Then ¶
func (e *FilamentCalculatorMockRequestDuplicateExpectation) Then(foundRequest *record.CompositeFilamentRecord, foundResult *record.CompositeFilamentRecord, err error) *FilamentCalculatorMock
Then sets up FilamentCalculator.RequestDuplicate return parameters for the expectation previously defined by the When method
type FilamentCalculatorMockRequestDuplicateParams ¶
type FilamentCalculatorMockRequestDuplicateParams struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockRequestDuplicateParams contains parameters of the FilamentCalculator.RequestDuplicate
type FilamentCalculatorMockRequestDuplicateResults ¶
type FilamentCalculatorMockRequestDuplicateResults struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockRequestDuplicateResults contains results of the FilamentCalculator.RequestDuplicate
type FilamentCalculatorMockRequestInfoExpectation ¶
type FilamentCalculatorMockRequestInfoExpectation struct { Counter uint64 // contains filtered or unexported fields }
FilamentCalculatorMockRequestInfoExpectation specifies expectation struct of the FilamentCalculator.RequestInfo
func (*FilamentCalculatorMockRequestInfoExpectation) Then ¶
func (e *FilamentCalculatorMockRequestInfoExpectation) Then(foundRequest *record.CompositeFilamentRecord, foundResult *record.CompositeFilamentRecord, err error) *FilamentCalculatorMock
Then sets up FilamentCalculator.RequestInfo return parameters for the expectation previously defined by the When method
type FilamentCalculatorMockRequestInfoParams ¶
type FilamentCalculatorMockRequestInfoParams struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockRequestInfoParams contains parameters of the FilamentCalculator.RequestInfo
type FilamentCalculatorMockRequestInfoResults ¶
type FilamentCalculatorMockRequestInfoResults struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockRequestInfoResults contains results of the FilamentCalculator.RequestInfo
type FilamentCalculatorMockRequestsExpectation ¶
type FilamentCalculatorMockRequestsExpectation struct { Counter uint64 // contains filtered or unexported fields }
FilamentCalculatorMockRequestsExpectation specifies expectation struct of the FilamentCalculator.Requests
func (*FilamentCalculatorMockRequestsExpectation) Then ¶
func (e *FilamentCalculatorMockRequestsExpectation) Then(ca1 []record.CompositeFilamentRecord, err error) *FilamentCalculatorMock
Then sets up FilamentCalculator.Requests return parameters for the expectation previously defined by the When method
type FilamentCalculatorMockRequestsParams ¶
type FilamentCalculatorMockRequestsParams struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockRequestsParams contains parameters of the FilamentCalculator.Requests
type FilamentCalculatorMockRequestsResults ¶
type FilamentCalculatorMockRequestsResults struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockRequestsResults contains results of the FilamentCalculator.Requests
type FilamentCalculatorMockResultDuplicateExpectation ¶
type FilamentCalculatorMockResultDuplicateExpectation struct { Counter uint64 // contains filtered or unexported fields }
FilamentCalculatorMockResultDuplicateExpectation specifies expectation struct of the FilamentCalculator.ResultDuplicate
func (*FilamentCalculatorMockResultDuplicateExpectation) Then ¶
func (e *FilamentCalculatorMockResultDuplicateExpectation) Then(foundResult *record.CompositeFilamentRecord, err error) *FilamentCalculatorMock
Then sets up FilamentCalculator.ResultDuplicate return parameters for the expectation previously defined by the When method
type FilamentCalculatorMockResultDuplicateParams ¶
type FilamentCalculatorMockResultDuplicateParams struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockResultDuplicateParams contains parameters of the FilamentCalculator.ResultDuplicate
type FilamentCalculatorMockResultDuplicateResults ¶
type FilamentCalculatorMockResultDuplicateResults struct {
// contains filtered or unexported fields
}
FilamentCalculatorMockResultDuplicateResults contains results of the FilamentCalculator.ResultDuplicate
type FilamentCleaner ¶
type FilamentCleanerMock ¶
type FilamentCleanerMock struct { ClearMock mFilamentCleanerMockClear // contains filtered or unexported fields }
FilamentCleanerMock implements FilamentCleaner
func NewFilamentCleanerMock ¶
func NewFilamentCleanerMock(t minimock.Tester) *FilamentCleanerMock
NewFilamentCleanerMock returns a mock for FilamentCleaner
func (*FilamentCleanerMock) Clear ¶
func (mmClear *FilamentCleanerMock) Clear(objID insolar.ID)
Clear implements FilamentCleaner
func (*FilamentCleanerMock) ClearAfterCounter ¶
func (mmClear *FilamentCleanerMock) ClearAfterCounter() uint64
ClearAfterCounter returns a count of finished FilamentCleanerMock.Clear invocations
func (*FilamentCleanerMock) ClearBeforeCounter ¶
func (mmClear *FilamentCleanerMock) ClearBeforeCounter() uint64
ClearBeforeCounter returns a count of FilamentCleanerMock.Clear invocations
func (*FilamentCleanerMock) MinimockClearDone ¶
func (m *FilamentCleanerMock) MinimockClearDone() bool
MinimockClearDone returns true if the count of the Clear invocations corresponds the number of defined expectations
func (*FilamentCleanerMock) MinimockClearInspect ¶
func (m *FilamentCleanerMock) MinimockClearInspect()
MinimockClearInspect logs each unmet expectation
func (*FilamentCleanerMock) MinimockFinish ¶
func (m *FilamentCleanerMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*FilamentCleanerMock) MinimockWait ¶
func (m *FilamentCleanerMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type FilamentCleanerMockClearExpectation ¶
type FilamentCleanerMockClearExpectation struct { Counter uint64 // contains filtered or unexported fields }
FilamentCleanerMockClearExpectation specifies expectation struct of the FilamentCleaner.Clear
type FilamentCleanerMockClearParams ¶
type FilamentCleanerMockClearParams struct {
// contains filtered or unexported fields
}
FilamentCleanerMockClearParams contains parameters of the FilamentCleaner.Clear
type HotDataStatusChecker ¶
type HotDataStatusChecker interface {
IsReceived(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber) bool
}
HotDataStatusChecker provides methods for checking receiving status of hot data.
type HotSender ¶
type HotSender interface {
SendHot(ctx context.Context, old, new insolar.PulseNumber, jets []insolar.JetID) error
}
HotSender provides sending hot records send for provided pulse.
type HotSenderDefault ¶
type HotSenderDefault struct {
// contains filtered or unexported fields
}
HotSenderDefault implements HotSender.
func NewHotSender ¶
func NewHotSender( dropAccessor drop.Accessor, indexAccessor object.IndexAccessor, pulseCalculator pulse.Calculator, jetAccessor jet.Accessor, lightChainLimit int, sender bus.Sender, ) *HotSenderDefault
NewHotSender returns a new instance of a default HotSender implementation.
func (*HotSenderDefault) SendHot ¶
func (m *HotSenderDefault) SendHot( ctx context.Context, currentPulse, newPulse insolar.PulseNumber, jets []insolar.JetID, ) error
SendHot send hot records from oldPulse to all jets in newPulse.
type JetCalculator ¶
type JetCalculator interface { // MineForPulse returns current node's jets for a provided pulse MineForPulse(ctx context.Context, pn insolar.PulseNumber) ([]insolar.JetID, error) }
JetCalculator provides get jets method for provided pulse.
type JetCalculatorDefault ¶
type JetCalculatorDefault struct {
// contains filtered or unexported fields
}
JetCalculatorDefault implements JetCalculator.
func NewJetCalculator ¶
func NewJetCalculator(jetCoordinator jet.Coordinator, jetAccessor jet.Accessor) *JetCalculatorDefault
NewJetCalculator returns a new instance of a default jet calculator implementation.
func (*JetCalculatorDefault) MineForPulse ¶
func (c *JetCalculatorDefault) MineForPulse(ctx context.Context, pn insolar.PulseNumber) ([]insolar.JetID, error)
MineForPulse returns current node's jets for a provided pulse.
type JetCalculatorMock ¶
type JetCalculatorMock struct { MineForPulseMock mJetCalculatorMockMineForPulse // contains filtered or unexported fields }
JetCalculatorMock implements JetCalculator
func NewJetCalculatorMock ¶
func NewJetCalculatorMock(t minimock.Tester) *JetCalculatorMock
NewJetCalculatorMock returns a mock for JetCalculator
func (*JetCalculatorMock) MineForPulse ¶
func (mmMineForPulse *JetCalculatorMock) MineForPulse(ctx context.Context, pn insolar.PulseNumber) (ja1 []insolar.JetID, err error)
MineForPulse implements JetCalculator
func (*JetCalculatorMock) MineForPulseAfterCounter ¶
func (mmMineForPulse *JetCalculatorMock) MineForPulseAfterCounter() uint64
MineForPulseAfterCounter returns a count of finished JetCalculatorMock.MineForPulse invocations
func (*JetCalculatorMock) MineForPulseBeforeCounter ¶
func (mmMineForPulse *JetCalculatorMock) MineForPulseBeforeCounter() uint64
MineForPulseBeforeCounter returns a count of JetCalculatorMock.MineForPulse invocations
func (*JetCalculatorMock) MinimockFinish ¶
func (m *JetCalculatorMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*JetCalculatorMock) MinimockMineForPulseDone ¶
func (m *JetCalculatorMock) MinimockMineForPulseDone() bool
MinimockMineForPulseDone returns true if the count of the MineForPulse invocations corresponds the number of defined expectations
func (*JetCalculatorMock) MinimockMineForPulseInspect ¶
func (m *JetCalculatorMock) MinimockMineForPulseInspect()
MinimockMineForPulseInspect logs each unmet expectation
func (*JetCalculatorMock) MinimockWait ¶
func (m *JetCalculatorMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type JetCalculatorMockMineForPulseExpectation ¶
type JetCalculatorMockMineForPulseExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetCalculatorMockMineForPulseExpectation specifies expectation struct of the JetCalculator.MineForPulse
func (*JetCalculatorMockMineForPulseExpectation) Then ¶
func (e *JetCalculatorMockMineForPulseExpectation) Then(ja1 []insolar.JetID, err error) *JetCalculatorMock
Then sets up JetCalculator.MineForPulse return parameters for the expectation previously defined by the When method
type JetCalculatorMockMineForPulseParams ¶
type JetCalculatorMockMineForPulseParams struct {
// contains filtered or unexported fields
}
JetCalculatorMockMineForPulseParams contains parameters of the JetCalculator.MineForPulse
type JetCalculatorMockMineForPulseResults ¶
type JetCalculatorMockMineForPulseResults struct {
// contains filtered or unexported fields
}
JetCalculatorMockMineForPulseResults contains results of the JetCalculator.MineForPulse
type JetFetcher ¶
type JetFetcher interface { Fetch(ctx context.Context, target insolar.ID, pulse insolar.PulseNumber) (*insolar.ID, error) Release(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber) }
JetFetcher can be used to get actual jets. It involves fetching jet from other nodes via network and updating local jet tree.
func NewFetcher ¶
func NewFetcher( ans node.Accessor, js jet.Storage, s bus.Sender, jc jet.Coordinator, ) JetFetcher
NewFetcher creates new fetcher instance.
type JetFetcherMock ¶
type JetFetcherMock struct { FetchMock mJetFetcherMockFetch ReleaseMock mJetFetcherMockRelease // contains filtered or unexported fields }
JetFetcherMock implements JetFetcher
func NewJetFetcherMock ¶
func NewJetFetcherMock(t minimock.Tester) *JetFetcherMock
NewJetFetcherMock returns a mock for JetFetcher
func (*JetFetcherMock) Fetch ¶
func (mmFetch *JetFetcherMock) Fetch(ctx context.Context, target insolar.ID, pulse insolar.PulseNumber) (ip1 *insolar.ID, err error)
Fetch implements JetFetcher
func (*JetFetcherMock) FetchAfterCounter ¶
func (mmFetch *JetFetcherMock) FetchAfterCounter() uint64
FetchAfterCounter returns a count of finished JetFetcherMock.Fetch invocations
func (*JetFetcherMock) FetchBeforeCounter ¶
func (mmFetch *JetFetcherMock) FetchBeforeCounter() uint64
FetchBeforeCounter returns a count of JetFetcherMock.Fetch invocations
func (*JetFetcherMock) MinimockFetchDone ¶
func (m *JetFetcherMock) MinimockFetchDone() bool
MinimockFetchDone returns true if the count of the Fetch invocations corresponds the number of defined expectations
func (*JetFetcherMock) MinimockFetchInspect ¶
func (m *JetFetcherMock) MinimockFetchInspect()
MinimockFetchInspect logs each unmet expectation
func (*JetFetcherMock) MinimockFinish ¶
func (m *JetFetcherMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*JetFetcherMock) MinimockReleaseDone ¶
func (m *JetFetcherMock) MinimockReleaseDone() bool
MinimockReleaseDone returns true if the count of the Release invocations corresponds the number of defined expectations
func (*JetFetcherMock) MinimockReleaseInspect ¶
func (m *JetFetcherMock) MinimockReleaseInspect()
MinimockReleaseInspect logs each unmet expectation
func (*JetFetcherMock) MinimockWait ¶
func (m *JetFetcherMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*JetFetcherMock) Release ¶
func (mmRelease *JetFetcherMock) Release(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber)
Release implements JetFetcher
func (*JetFetcherMock) ReleaseAfterCounter ¶
func (mmRelease *JetFetcherMock) ReleaseAfterCounter() uint64
ReleaseAfterCounter returns a count of finished JetFetcherMock.Release invocations
func (*JetFetcherMock) ReleaseBeforeCounter ¶
func (mmRelease *JetFetcherMock) ReleaseBeforeCounter() uint64
ReleaseBeforeCounter returns a count of JetFetcherMock.Release invocations
type JetFetcherMockFetchExpectation ¶
type JetFetcherMockFetchExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetFetcherMockFetchExpectation specifies expectation struct of the JetFetcher.Fetch
func (*JetFetcherMockFetchExpectation) Then ¶
func (e *JetFetcherMockFetchExpectation) Then(ip1 *insolar.ID, err error) *JetFetcherMock
Then sets up JetFetcher.Fetch return parameters for the expectation previously defined by the When method
type JetFetcherMockFetchParams ¶
type JetFetcherMockFetchParams struct {
// contains filtered or unexported fields
}
JetFetcherMockFetchParams contains parameters of the JetFetcher.Fetch
type JetFetcherMockFetchResults ¶
type JetFetcherMockFetchResults struct {
// contains filtered or unexported fields
}
JetFetcherMockFetchResults contains results of the JetFetcher.Fetch
type JetFetcherMockReleaseExpectation ¶
type JetFetcherMockReleaseExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetFetcherMockReleaseExpectation specifies expectation struct of the JetFetcher.Release
type JetFetcherMockReleaseParams ¶
type JetFetcherMockReleaseParams struct {
// contains filtered or unexported fields
}
JetFetcherMockReleaseParams contains parameters of the JetFetcher.Release
type JetInfo ¶
type JetInfo struct { ID insolar.JetID // SplitIntent indicates what jet has intention to do split in next pulse. SplitIntent bool // MustSplit indicates what jet should be split in current pulse. MustSplit bool }
JetInfo holds info about jet.
type JetReleaser ¶
type JetReleaser interface { Unlock(ctx context.Context, pulse insolar.PulseNumber, jetID insolar.JetID) error CloseAllUntil(ctx context.Context, pulse insolar.PulseNumber) }
JetReleaser provides methods for releasing jet waiters.
type JetReleaserMock ¶
type JetReleaserMock struct { CloseAllUntilMock mJetReleaserMockCloseAllUntil UnlockMock mJetReleaserMockUnlock // contains filtered or unexported fields }
JetReleaserMock implements JetReleaser
func NewJetReleaserMock ¶
func NewJetReleaserMock(t minimock.Tester) *JetReleaserMock
NewJetReleaserMock returns a mock for JetReleaser
func (*JetReleaserMock) CloseAllUntil ¶
func (mmCloseAllUntil *JetReleaserMock) CloseAllUntil(ctx context.Context, pulse insolar.PulseNumber)
CloseAllUntil implements JetReleaser
func (*JetReleaserMock) CloseAllUntilAfterCounter ¶
func (mmCloseAllUntil *JetReleaserMock) CloseAllUntilAfterCounter() uint64
CloseAllUntilAfterCounter returns a count of finished JetReleaserMock.CloseAllUntil invocations
func (*JetReleaserMock) CloseAllUntilBeforeCounter ¶
func (mmCloseAllUntil *JetReleaserMock) CloseAllUntilBeforeCounter() uint64
CloseAllUntilBeforeCounter returns a count of JetReleaserMock.CloseAllUntil invocations
func (*JetReleaserMock) MinimockCloseAllUntilDone ¶
func (m *JetReleaserMock) MinimockCloseAllUntilDone() bool
MinimockCloseAllUntilDone returns true if the count of the CloseAllUntil invocations corresponds the number of defined expectations
func (*JetReleaserMock) MinimockCloseAllUntilInspect ¶
func (m *JetReleaserMock) MinimockCloseAllUntilInspect()
MinimockCloseAllUntilInspect logs each unmet expectation
func (*JetReleaserMock) MinimockFinish ¶
func (m *JetReleaserMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*JetReleaserMock) MinimockUnlockDone ¶
func (m *JetReleaserMock) MinimockUnlockDone() bool
MinimockUnlockDone returns true if the count of the Unlock invocations corresponds the number of defined expectations
func (*JetReleaserMock) MinimockUnlockInspect ¶
func (m *JetReleaserMock) MinimockUnlockInspect()
MinimockUnlockInspect logs each unmet expectation
func (*JetReleaserMock) MinimockWait ¶
func (m *JetReleaserMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*JetReleaserMock) Unlock ¶
func (mmUnlock *JetReleaserMock) Unlock(ctx context.Context, pulse insolar.PulseNumber, jetID insolar.JetID) (err error)
Unlock implements JetReleaser
func (*JetReleaserMock) UnlockAfterCounter ¶
func (mmUnlock *JetReleaserMock) UnlockAfterCounter() uint64
UnlockAfterCounter returns a count of finished JetReleaserMock.Unlock invocations
func (*JetReleaserMock) UnlockBeforeCounter ¶
func (mmUnlock *JetReleaserMock) UnlockBeforeCounter() uint64
UnlockBeforeCounter returns a count of JetReleaserMock.Unlock invocations
type JetReleaserMockCloseAllUntilExpectation ¶
type JetReleaserMockCloseAllUntilExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetReleaserMockCloseAllUntilExpectation specifies expectation struct of the JetReleaser.CloseAllUntil
type JetReleaserMockCloseAllUntilParams ¶
type JetReleaserMockCloseAllUntilParams struct {
// contains filtered or unexported fields
}
JetReleaserMockCloseAllUntilParams contains parameters of the JetReleaser.CloseAllUntil
type JetReleaserMockUnlockExpectation ¶
type JetReleaserMockUnlockExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetReleaserMockUnlockExpectation specifies expectation struct of the JetReleaser.Unlock
func (*JetReleaserMockUnlockExpectation) Then ¶
func (e *JetReleaserMockUnlockExpectation) Then(err error) *JetReleaserMock
Then sets up JetReleaser.Unlock return parameters for the expectation previously defined by the When method
type JetReleaserMockUnlockParams ¶
type JetReleaserMockUnlockParams struct {
// contains filtered or unexported fields
}
JetReleaserMockUnlockParams contains parameters of the JetReleaser.Unlock
type JetReleaserMockUnlockResults ¶
type JetReleaserMockUnlockResults struct {
// contains filtered or unexported fields
}
JetReleaserMockUnlockResults contains results of the JetReleaser.Unlock
type JetSplitter ¶
type JetSplitter interface { // Do performs jets processing, it decides which jets to split and returns list of resulting jets). Do( ctx context.Context, ended insolar.PulseNumber, new insolar.PulseNumber, jets []insolar.JetID, createDrops bool, ) ([]insolar.JetID, error) }
JetSplitter provides method for processing and splitting jets.
type JetSplitterDefault ¶
type JetSplitterDefault struct {
// contains filtered or unexported fields
}
JetSplitterDefault implements JetSplitter.
func NewJetSplitter ¶
func NewJetSplitter( cfg configuration.JetSplit, jetCalculator JetCalculator, jetAccessor jet.Accessor, jetModifier jet.Modifier, dropAccessor drop.Accessor, dropModifier drop.Modifier, pulseCalculator pulse.Calculator, recordsAccessor object.RecordCollectionAccessor, ) *JetSplitterDefault
NewJetSplitter returns a new instance of a default jet splitter implementation.
func (*JetSplitterDefault) Do ¶
func (js *JetSplitterDefault) Do( ctx context.Context, endedPulse insolar.PulseNumber, newPulse insolar.PulseNumber, jets []insolar.JetID, createDrops bool, ) ([]insolar.JetID, error)
Do performs jets processing, it decides which jets to split and returns list of resulting jets.
type JetWaiter ¶
type JetWaiter interface {
Wait(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber) error
}
JetWaiter provides method for locking on jet id.
type JetWaiterMock ¶ added in v0.9.2
type JetWaiterMock struct { WaitMock mJetWaiterMockWait // contains filtered or unexported fields }
JetWaiterMock implements JetWaiter
func NewJetWaiterMock ¶ added in v0.9.2
func NewJetWaiterMock(t minimock.Tester) *JetWaiterMock
NewJetWaiterMock returns a mock for JetWaiter
func (*JetWaiterMock) MinimockFinish ¶ added in v0.9.2
func (m *JetWaiterMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*JetWaiterMock) MinimockWait ¶ added in v0.9.2
func (m *JetWaiterMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*JetWaiterMock) MinimockWaitDone ¶ added in v0.9.2
func (m *JetWaiterMock) MinimockWaitDone() bool
MinimockWaitDone returns true if the count of the Wait invocations corresponds the number of defined expectations
func (*JetWaiterMock) MinimockWaitInspect ¶ added in v0.9.2
func (m *JetWaiterMock) MinimockWaitInspect()
MinimockWaitInspect logs each unmet expectation
func (*JetWaiterMock) Wait ¶ added in v0.9.2
func (mmWait *JetWaiterMock) Wait(ctx context.Context, jetID insolar.JetID, pulse insolar.PulseNumber) (err error)
Wait implements JetWaiter
func (*JetWaiterMock) WaitAfterCounter ¶ added in v0.9.2
func (mmWait *JetWaiterMock) WaitAfterCounter() uint64
WaitAfterCounter returns a count of finished JetWaiterMock.Wait invocations
func (*JetWaiterMock) WaitBeforeCounter ¶ added in v0.9.2
func (mmWait *JetWaiterMock) WaitBeforeCounter() uint64
WaitBeforeCounter returns a count of JetWaiterMock.Wait invocations
type JetWaiterMockWaitExpectation ¶ added in v0.9.2
type JetWaiterMockWaitExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetWaiterMockWaitExpectation specifies expectation struct of the JetWaiter.Wait
func (*JetWaiterMockWaitExpectation) Then ¶ added in v0.9.2
func (e *JetWaiterMockWaitExpectation) Then(err error) *JetWaiterMock
Then sets up JetWaiter.Wait return parameters for the expectation previously defined by the When method
type JetWaiterMockWaitParams ¶ added in v0.9.2
type JetWaiterMockWaitParams struct {
// contains filtered or unexported fields
}
JetWaiterMockWaitParams contains parameters of the JetWaiter.Wait
type JetWaiterMockWaitResults ¶ added in v0.9.2
type JetWaiterMockWaitResults struct {
// contains filtered or unexported fields
}
JetWaiterMockWaitResults contains results of the JetWaiter.Wait
type LightCleaner ¶
type LightCleaner struct {
// contains filtered or unexported fields
}
LightCleaner is an implementation of Cleaner interface
func NewCleaner ¶
func NewCleaner( jetCleaner jet.Cleaner, nodeModifier node.Modifier, dropCleaner drop.Cleaner, recCleaner object.RecordCleaner, indexCleaner object.IndexCleaner, pulseShifter pulse.Shifter, pulseCalculator pulse.Calculator, indexAccessor object.IndexAccessor, filamentCleaner FilamentCleaner, lightChainLimit int, cleanerDelay int, ) *LightCleaner
NewCleaner creates a new instance of LightCleaner
func (*LightCleaner) NotifyAboutPulse ¶
func (c *LightCleaner) NotifyAboutPulse(ctx context.Context, pn insolar.PulseNumber)
NotifyAboutPulse cleans a light's data. When it's called, it tries to fetch pulse, which is backwards by a size of lightChainLimit. If a pulse is fetched successfully, all the data for it will be cleaned
func (*LightCleaner) Stop ¶
func (c *LightCleaner) Stop()
type LightReplicator ¶
type LightReplicator interface { // NotifyAboutPulse is method for notifying a sync component about new pulse NotifyAboutPulse(ctx context.Context, pn insolar.PulseNumber) // Stop stops the component Stop() }
LightReplicator is a base interface for a sync component
type LightReplicatorDefault ¶
type LightReplicatorDefault struct {
// contains filtered or unexported fields
}
LightReplicatorDefault is a base impl of LightReplicator
func NewReplicatorDefault ¶
func NewReplicatorDefault( jetCalculator JetCalculator, cleaner Cleaner, sender bus.Sender, calculator pulse.Calculator, dropAccessor drop.Accessor, recsAccessor object.RecordCollectionAccessor, idxAccessor object.IndexAccessor, jetAccessor jet.Accessor, ) *LightReplicatorDefault
NewReplicatorDefault creates new instance of LightReplicator
func (*LightReplicatorDefault) NotifyAboutPulse ¶
func (lr *LightReplicatorDefault) NotifyAboutPulse(ctx context.Context, pn insolar.PulseNumber)
NotifyAboutPulse is method for notifying a sync component about new pulse When it's called, a provided pulse is added to a channel. There is a special gorutine that is reading that channel. When a new pulse is being received, the routine starts to gather data (with using of LightDataGatherer). After gathering all the data, it attempts to send it to the heavy. After sending a heavy payload to a heavy, data is deleted with help of Cleaner
func (*LightReplicatorDefault) Stop ¶
func (lr *LightReplicatorDefault) Stop()
type PulseManager ¶
type PulseManager struct {
// contains filtered or unexported fields
}
PulseManager implements insolar.PulseManager.
func NewPulseManager ¶
func NewPulseManager( nodeNet network.NodeNetwork, dispatchers []dispatcher.Dispatcher, nodeSetter node.Modifier, pulseAccessor pulse.Accessor, pulseAppender pulse.Appender, jetReleaser JetReleaser, jetSplitter JetSplitter, lightReplicator LightReplicator, hotSender HotSender, writeManager WriteManager, stateIniter StateIniter, hotStatusChecker HotDataStatusChecker, ) *PulseManager
NewPulseManager creates PulseManager instance.
type RequestChecker ¶
type RequestCheckerDefault ¶
type RequestCheckerDefault struct {
// contains filtered or unexported fields
}
func NewRequestChecker ¶
func NewRequestChecker( fc FilamentCalculator, c jet.Coordinator, jf JetFetcher, scheme insolar.PlatformCryptographyScheme, sender bus.Sender, ) *RequestCheckerDefault
func (*RequestCheckerDefault) CheckRequest ¶
type RequestCheckerMock ¶
type RequestCheckerMock struct { CheckRequestMock mRequestCheckerMockCheckRequest // contains filtered or unexported fields }
RequestCheckerMock implements RequestChecker
func NewRequestCheckerMock ¶
func NewRequestCheckerMock(t minimock.Tester) *RequestCheckerMock
NewRequestCheckerMock returns a mock for RequestChecker
func (*RequestCheckerMock) CheckRequest ¶
func (mmCheckRequest *RequestCheckerMock) CheckRequest(ctx context.Context, requestID insolar.ID, request record.Request) (err error)
CheckRequest implements RequestChecker
func (*RequestCheckerMock) CheckRequestAfterCounter ¶
func (mmCheckRequest *RequestCheckerMock) CheckRequestAfterCounter() uint64
CheckRequestAfterCounter returns a count of finished RequestCheckerMock.CheckRequest invocations
func (*RequestCheckerMock) CheckRequestBeforeCounter ¶
func (mmCheckRequest *RequestCheckerMock) CheckRequestBeforeCounter() uint64
CheckRequestBeforeCounter returns a count of RequestCheckerMock.CheckRequest invocations
func (*RequestCheckerMock) MinimockCheckRequestDone ¶
func (m *RequestCheckerMock) MinimockCheckRequestDone() bool
MinimockCheckRequestDone returns true if the count of the CheckRequest invocations corresponds the number of defined expectations
func (*RequestCheckerMock) MinimockCheckRequestInspect ¶
func (m *RequestCheckerMock) MinimockCheckRequestInspect()
MinimockCheckRequestInspect logs each unmet expectation
func (*RequestCheckerMock) MinimockFinish ¶
func (m *RequestCheckerMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*RequestCheckerMock) MinimockWait ¶
func (m *RequestCheckerMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type RequestCheckerMockCheckRequestExpectation ¶
type RequestCheckerMockCheckRequestExpectation struct { Counter uint64 // contains filtered or unexported fields }
RequestCheckerMockCheckRequestExpectation specifies expectation struct of the RequestChecker.CheckRequest
func (*RequestCheckerMockCheckRequestExpectation) Then ¶
func (e *RequestCheckerMockCheckRequestExpectation) Then(err error) *RequestCheckerMock
Then sets up RequestChecker.CheckRequest return parameters for the expectation previously defined by the When method
type RequestCheckerMockCheckRequestParams ¶
type RequestCheckerMockCheckRequestParams struct {
// contains filtered or unexported fields
}
RequestCheckerMockCheckRequestParams contains parameters of the RequestChecker.CheckRequest
type RequestCheckerMockCheckRequestResults ¶
type RequestCheckerMockCheckRequestResults struct {
// contains filtered or unexported fields
}
RequestCheckerMockCheckRequestResults contains results of the RequestChecker.CheckRequest
type StateIniter ¶
type StateIniterDefault ¶
type StateIniterDefault struct {
// contains filtered or unexported fields
}
StateIniterDefault implements StateIniter.
func NewStateIniter ¶
func NewStateIniter( jetModifier jet.Modifier, jetReleaser JetReleaser, drops drop.Modifier, nodes node.Accessor, sender bus.Sender, pulseAppender insolarPulse.Appender, pulseAccessor insolarPulse.Accessor, calc JetCalculator, indexes object.MemoryIndexModifier, ) *StateIniterDefault
NewStateIniter creates StateIniterDefault with all required components.
func (*StateIniterDefault) PrepareState ¶
func (s *StateIniterDefault) PrepareState( ctx context.Context, forPulse insolar.PulseNumber, ) (bool, []insolar.JetID, error)
type StateIniterMock ¶
type StateIniterMock struct { PrepareStateMock mStateIniterMockPrepareState // contains filtered or unexported fields }
StateIniterMock implements StateIniter
func NewStateIniterMock ¶
func NewStateIniterMock(t minimock.Tester) *StateIniterMock
NewStateIniterMock returns a mock for StateIniter
func (*StateIniterMock) MinimockFinish ¶
func (m *StateIniterMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*StateIniterMock) MinimockPrepareStateDone ¶
func (m *StateIniterMock) MinimockPrepareStateDone() bool
MinimockPrepareStateDone returns true if the count of the PrepareState invocations corresponds the number of defined expectations
func (*StateIniterMock) MinimockPrepareStateInspect ¶
func (m *StateIniterMock) MinimockPrepareStateInspect()
MinimockPrepareStateInspect logs each unmet expectation
func (*StateIniterMock) MinimockWait ¶
func (m *StateIniterMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*StateIniterMock) PrepareState ¶
func (mmPrepareState *StateIniterMock) PrepareState(ctx context.Context, pulse insolar.PulseNumber) (justJoined bool, jets []insolar.JetID, err error)
PrepareState implements StateIniter
func (*StateIniterMock) PrepareStateAfterCounter ¶
func (mmPrepareState *StateIniterMock) PrepareStateAfterCounter() uint64
PrepareStateAfterCounter returns a count of finished StateIniterMock.PrepareState invocations
func (*StateIniterMock) PrepareStateBeforeCounter ¶
func (mmPrepareState *StateIniterMock) PrepareStateBeforeCounter() uint64
PrepareStateBeforeCounter returns a count of StateIniterMock.PrepareState invocations
type StateIniterMockPrepareStateExpectation ¶
type StateIniterMockPrepareStateExpectation struct { Counter uint64 // contains filtered or unexported fields }
StateIniterMockPrepareStateExpectation specifies expectation struct of the StateIniter.PrepareState
func (*StateIniterMockPrepareStateExpectation) Then ¶
func (e *StateIniterMockPrepareStateExpectation) Then(justJoined bool, jets []insolar.JetID, err error) *StateIniterMock
Then sets up StateIniter.PrepareState return parameters for the expectation previously defined by the When method
type StateIniterMockPrepareStateParams ¶
type StateIniterMockPrepareStateParams struct {
// contains filtered or unexported fields
}
StateIniterMockPrepareStateParams contains parameters of the StateIniter.PrepareState
type StateIniterMockPrepareStateResults ¶
type StateIniterMockPrepareStateResults struct {
// contains filtered or unexported fields
}
StateIniterMockPrepareStateResults contains results of the StateIniter.PrepareState
type WriteAccessor ¶
type WriteAccessor interface { // Begin requests writing access for pulse number. If requested pulse is closed, ErrWriteClosed will be returned. // The caller must call returned "done" function when finished writing. Begin(context.Context, insolar.PulseNumber) (done func(), err error) }
type WriteAccessorMock ¶
type WriteAccessorMock struct { BeginMock mWriteAccessorMockBegin // contains filtered or unexported fields }
WriteAccessorMock implements WriteAccessor
func NewWriteAccessorMock ¶
func NewWriteAccessorMock(t minimock.Tester) *WriteAccessorMock
NewWriteAccessorMock returns a mock for WriteAccessor
func (*WriteAccessorMock) Begin ¶
func (mmBegin *WriteAccessorMock) Begin(ctx context.Context, p1 insolar.PulseNumber) (done func(), err error)
Begin implements WriteAccessor
func (*WriteAccessorMock) BeginAfterCounter ¶
func (mmBegin *WriteAccessorMock) BeginAfterCounter() uint64
BeginAfterCounter returns a count of finished WriteAccessorMock.Begin invocations
func (*WriteAccessorMock) BeginBeforeCounter ¶
func (mmBegin *WriteAccessorMock) BeginBeforeCounter() uint64
BeginBeforeCounter returns a count of WriteAccessorMock.Begin invocations
func (*WriteAccessorMock) MinimockBeginDone ¶
func (m *WriteAccessorMock) MinimockBeginDone() bool
MinimockBeginDone returns true if the count of the Begin invocations corresponds the number of defined expectations
func (*WriteAccessorMock) MinimockBeginInspect ¶
func (m *WriteAccessorMock) MinimockBeginInspect()
MinimockBeginInspect logs each unmet expectation
func (*WriteAccessorMock) MinimockFinish ¶
func (m *WriteAccessorMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*WriteAccessorMock) MinimockWait ¶
func (m *WriteAccessorMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type WriteAccessorMockBeginExpectation ¶
type WriteAccessorMockBeginExpectation struct { Counter uint64 // contains filtered or unexported fields }
WriteAccessorMockBeginExpectation specifies expectation struct of the WriteAccessor.Begin
func (*WriteAccessorMockBeginExpectation) Then ¶
func (e *WriteAccessorMockBeginExpectation) Then(done func(), err error) *WriteAccessorMock
Then sets up WriteAccessor.Begin return parameters for the expectation previously defined by the When method
type WriteAccessorMockBeginParams ¶
type WriteAccessorMockBeginParams struct {
// contains filtered or unexported fields
}
WriteAccessorMockBeginParams contains parameters of the WriteAccessor.Begin
type WriteAccessorMockBeginResults ¶
type WriteAccessorMockBeginResults struct {
// contains filtered or unexported fields
}
WriteAccessorMockBeginResults contains results of the WriteAccessor.Begin
type WriteController ¶
type WriteController struct {
// contains filtered or unexported fields
}
func NewWriteController ¶
func NewWriteController() *WriteController
func (*WriteController) Begin ¶
func (m *WriteController) Begin(ctx context.Context, pulse insolar.PulseNumber) (func(), error)
func (*WriteController) CloseAndWait ¶
func (m *WriteController) CloseAndWait(ctx context.Context, pulse insolar.PulseNumber) error
func (*WriteController) Open ¶
func (m *WriteController) Open(ctx context.Context, pulse insolar.PulseNumber) error
type WriteManager ¶
type WriteManager interface { // Open marks pulse number as opened for writing. It can be used later by Begin from accessor. Open(context.Context, insolar.PulseNumber) error // CloseAndWait immediately marks pulse number as closed for writing and blocks until all writes are done. CloseAndWait(context.Context, insolar.PulseNumber) error }
type WriteManagerMock ¶
type WriteManagerMock struct { CloseAndWaitMock mWriteManagerMockCloseAndWait OpenMock mWriteManagerMockOpen // contains filtered or unexported fields }
WriteManagerMock implements WriteManager
func NewWriteManagerMock ¶
func NewWriteManagerMock(t minimock.Tester) *WriteManagerMock
NewWriteManagerMock returns a mock for WriteManager
func (*WriteManagerMock) CloseAndWait ¶
func (mmCloseAndWait *WriteManagerMock) CloseAndWait(ctx context.Context, p1 insolar.PulseNumber) (err error)
CloseAndWait implements WriteManager
func (*WriteManagerMock) CloseAndWaitAfterCounter ¶
func (mmCloseAndWait *WriteManagerMock) CloseAndWaitAfterCounter() uint64
CloseAndWaitAfterCounter returns a count of finished WriteManagerMock.CloseAndWait invocations
func (*WriteManagerMock) CloseAndWaitBeforeCounter ¶
func (mmCloseAndWait *WriteManagerMock) CloseAndWaitBeforeCounter() uint64
CloseAndWaitBeforeCounter returns a count of WriteManagerMock.CloseAndWait invocations
func (*WriteManagerMock) MinimockCloseAndWaitDone ¶
func (m *WriteManagerMock) MinimockCloseAndWaitDone() bool
MinimockCloseAndWaitDone returns true if the count of the CloseAndWait invocations corresponds the number of defined expectations
func (*WriteManagerMock) MinimockCloseAndWaitInspect ¶
func (m *WriteManagerMock) MinimockCloseAndWaitInspect()
MinimockCloseAndWaitInspect logs each unmet expectation
func (*WriteManagerMock) MinimockFinish ¶
func (m *WriteManagerMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*WriteManagerMock) MinimockOpenDone ¶
func (m *WriteManagerMock) MinimockOpenDone() bool
MinimockOpenDone returns true if the count of the Open invocations corresponds the number of defined expectations
func (*WriteManagerMock) MinimockOpenInspect ¶
func (m *WriteManagerMock) MinimockOpenInspect()
MinimockOpenInspect logs each unmet expectation
func (*WriteManagerMock) MinimockWait ¶
func (m *WriteManagerMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*WriteManagerMock) Open ¶
func (mmOpen *WriteManagerMock) Open(ctx context.Context, p1 insolar.PulseNumber) (err error)
Open implements WriteManager
func (*WriteManagerMock) OpenAfterCounter ¶
func (mmOpen *WriteManagerMock) OpenAfterCounter() uint64
OpenAfterCounter returns a count of finished WriteManagerMock.Open invocations
func (*WriteManagerMock) OpenBeforeCounter ¶
func (mmOpen *WriteManagerMock) OpenBeforeCounter() uint64
OpenBeforeCounter returns a count of WriteManagerMock.Open invocations
type WriteManagerMockCloseAndWaitExpectation ¶
type WriteManagerMockCloseAndWaitExpectation struct { Counter uint64 // contains filtered or unexported fields }
WriteManagerMockCloseAndWaitExpectation specifies expectation struct of the WriteManager.CloseAndWait
func (*WriteManagerMockCloseAndWaitExpectation) Then ¶
func (e *WriteManagerMockCloseAndWaitExpectation) Then(err error) *WriteManagerMock
Then sets up WriteManager.CloseAndWait return parameters for the expectation previously defined by the When method
type WriteManagerMockCloseAndWaitParams ¶
type WriteManagerMockCloseAndWaitParams struct {
// contains filtered or unexported fields
}
WriteManagerMockCloseAndWaitParams contains parameters of the WriteManager.CloseAndWait
type WriteManagerMockCloseAndWaitResults ¶
type WriteManagerMockCloseAndWaitResults struct {
// contains filtered or unexported fields
}
WriteManagerMockCloseAndWaitResults contains results of the WriteManager.CloseAndWait
type WriteManagerMockOpenExpectation ¶
type WriteManagerMockOpenExpectation struct { Counter uint64 // contains filtered or unexported fields }
WriteManagerMockOpenExpectation specifies expectation struct of the WriteManager.Open
func (*WriteManagerMockOpenExpectation) Then ¶
func (e *WriteManagerMockOpenExpectation) Then(err error) *WriteManagerMock
Then sets up WriteManager.Open return parameters for the expectation previously defined by the When method
type WriteManagerMockOpenParams ¶
type WriteManagerMockOpenParams struct {
// contains filtered or unexported fields
}
WriteManagerMockOpenParams contains parameters of the WriteManager.Open
type WriteManagerMockOpenResults ¶
type WriteManagerMockOpenResults struct {
// contains filtered or unexported fields
}
WriteManagerMockOpenResults contains results of the WriteManager.Open
Source Files ¶
- cleaner.go
- cleaner_mock.go
- detached_notifier.go
- detached_notifier_mock.go
- doc.go
- errors.go
- filament_calculator_mock.go
- filament_cleaner_mock.go
- filaments.go
- hot_sender.go
- jet_calculator.go
- jet_calculator_mock.go
- jet_fetcher.go
- jet_fetcher_mock.go
- jet_releaser_mock.go
- jet_splitter.go
- jet_waiter_mock.go
- lightreplicator.go
- metrics.go
- pulsemanager.go
- request_checker.go
- request_checker_mock.go
- state_initer.go
- state_initer_mock.go
- waiter.go
- write_accessor_mock.go
- write_manager_mock.go
- writecontroller.go