Documentation ¶
Index ¶
- Variables
- func FinalizePulse(ctx context.Context, pulses pulse.Calculator, backuper BackupMaker, ...)
- func NewdropTruncaterMock(t minimock.Tester) *dropTruncaterMock
- type BackupInfo
- type BackupMaker
- type BackupMakerDefault
- type BackupMakerMock
- func (mmMakeBackup *BackupMakerMock) MakeBackup(ctx context.Context, lastFinalizedPulse insolar.PulseNumber) (err error)
- func (mmMakeBackup *BackupMakerMock) MakeBackupAfterCounter() uint64
- func (mmMakeBackup *BackupMakerMock) MakeBackupBeforeCounter() uint64
- func (m *BackupMakerMock) MinimockFinish()
- func (m *BackupMakerMock) MinimockMakeBackupDone() bool
- func (m *BackupMakerMock) MinimockMakeBackupInspect()
- func (m *BackupMakerMock) MinimockWait(timeout mm_time.Duration)
- type BackupMakerMockMakeBackupExpectation
- type BackupMakerMockMakeBackupParams
- type BackupMakerMockMakeBackupResults
- type DBJetKeeper
- func (jk *DBJetKeeper) AddBackupConfirmation(ctx context.Context, pn insolar.PulseNumber) error
- func (jk *DBJetKeeper) AddDropConfirmation(ctx context.Context, pn insolar.PulseNumber, id insolar.JetID, split bool) error
- func (jk *DBJetKeeper) AddHotConfirmation(ctx context.Context, pn insolar.PulseNumber, id insolar.JetID, split bool) error
- func (jk *DBJetKeeper) HasAllJetConfirms(ctx context.Context, pulse insolar.PulseNumber) bool
- func (jk *DBJetKeeper) Storage() jet.Storage
- func (jk *DBJetKeeper) TopSyncPulse() insolar.PulseNumber
- func (jk *DBJetKeeper) TruncateHead(ctx context.Context, from insolar.PulseNumber) error
- type DBRollback
- type FinalizationKeeper
- type FinalizationKeeperDefault
- type HeadTruncaterMock
- func (m *HeadTruncaterMock) MinimockFinish()
- func (m *HeadTruncaterMock) MinimockTruncateHeadDone() bool
- func (m *HeadTruncaterMock) MinimockTruncateHeadInspect()
- func (m *HeadTruncaterMock) MinimockWait(timeout mm_time.Duration)
- func (mmTruncateHead *HeadTruncaterMock) TruncateHead(ctx context.Context, from insolar.PulseNumber) (err error)
- func (mmTruncateHead *HeadTruncaterMock) TruncateHeadAfterCounter() uint64
- func (mmTruncateHead *HeadTruncaterMock) TruncateHeadBeforeCounter() uint64
- type HeadTruncaterMockTruncateHeadExpectation
- type HeadTruncaterMockTruncateHeadParams
- type HeadTruncaterMockTruncateHeadResults
- type HeavyReplicator
- type HeavyReplicatorDefault
- type InitialState
- type InitialStateAccessor
- type InitialStateAccessorMock
- func (mmGet *InitialStateAccessorMock) Get(ctx context.Context, lightExecutor insolar.Reference, ...) (ip1 *InitialState)
- func (mmGet *InitialStateAccessorMock) GetAfterCounter() uint64
- func (mmGet *InitialStateAccessorMock) GetBeforeCounter() uint64
- func (m *InitialStateAccessorMock) MinimockFinish()
- func (m *InitialStateAccessorMock) MinimockGetDone() bool
- func (m *InitialStateAccessorMock) MinimockGetInspect()
- func (m *InitialStateAccessorMock) MinimockWait(timeout mm_time.Duration)
- type InitialStateAccessorMockGetExpectation
- type InitialStateAccessorMockGetParams
- type InitialStateAccessorMockGetResults
- type InitialStateKeeper
- type JetInfo
- func (*JetInfo) Descriptor() ([]byte, []int)
- func (this *JetInfo) Equal(that interface{}) bool
- func (this *JetInfo) GoString() string
- func (m *JetInfo) Marshal() (dAtA []byte, err error)
- func (m *JetInfo) MarshalTo(dAtA []byte) (int, error)
- func (*JetInfo) ProtoMessage()
- func (m *JetInfo) Reset()
- func (m *JetInfo) Size() (n int)
- func (this *JetInfo) String() string
- func (m *JetInfo) Unmarshal(dAtA []byte) error
- func (m *JetInfo) XXX_DiscardUnknown()
- func (m *JetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JetInfo) XXX_Merge(src proto.Message)
- func (m *JetInfo) XXX_Size() int
- func (m *JetInfo) XXX_Unmarshal(b []byte) error
- type JetKeeper
- type JetKeeperMock
- func (mmAddBackupConfirmation *JetKeeperMock) AddBackupConfirmation(ctx context.Context, pn insolar.PulseNumber) (err error)
- func (mmAddBackupConfirmation *JetKeeperMock) AddBackupConfirmationAfterCounter() uint64
- func (mmAddBackupConfirmation *JetKeeperMock) AddBackupConfirmationBeforeCounter() uint64
- func (mmAddDropConfirmation *JetKeeperMock) AddDropConfirmation(ctx context.Context, pn insolar.PulseNumber, jet insolar.JetID, split bool) (err error)
- func (mmAddDropConfirmation *JetKeeperMock) AddDropConfirmationAfterCounter() uint64
- func (mmAddDropConfirmation *JetKeeperMock) AddDropConfirmationBeforeCounter() uint64
- func (mmAddHotConfirmation *JetKeeperMock) AddHotConfirmation(ctx context.Context, pn insolar.PulseNumber, jet insolar.JetID, split bool) (err error)
- func (mmAddHotConfirmation *JetKeeperMock) AddHotConfirmationAfterCounter() uint64
- func (mmAddHotConfirmation *JetKeeperMock) AddHotConfirmationBeforeCounter() uint64
- func (mmHasAllJetConfirms *JetKeeperMock) HasAllJetConfirms(ctx context.Context, pn insolar.PulseNumber) (b1 bool)
- func (mmHasAllJetConfirms *JetKeeperMock) HasAllJetConfirmsAfterCounter() uint64
- func (mmHasAllJetConfirms *JetKeeperMock) HasAllJetConfirmsBeforeCounter() uint64
- func (m *JetKeeperMock) MinimockAddBackupConfirmationDone() bool
- func (m *JetKeeperMock) MinimockAddBackupConfirmationInspect()
- func (m *JetKeeperMock) MinimockAddDropConfirmationDone() bool
- func (m *JetKeeperMock) MinimockAddDropConfirmationInspect()
- func (m *JetKeeperMock) MinimockAddHotConfirmationDone() bool
- func (m *JetKeeperMock) MinimockAddHotConfirmationInspect()
- func (m *JetKeeperMock) MinimockFinish()
- func (m *JetKeeperMock) MinimockHasAllJetConfirmsDone() bool
- func (m *JetKeeperMock) MinimockHasAllJetConfirmsInspect()
- func (m *JetKeeperMock) MinimockStorageDone() bool
- func (m *JetKeeperMock) MinimockStorageInspect()
- func (m *JetKeeperMock) MinimockTopSyncPulseDone() bool
- func (m *JetKeeperMock) MinimockTopSyncPulseInspect()
- func (m *JetKeeperMock) MinimockWait(timeout mm_time.Duration)
- func (mmStorage *JetKeeperMock) Storage() (s1 jet.Storage)
- func (mmStorage *JetKeeperMock) StorageAfterCounter() uint64
- func (mmStorage *JetKeeperMock) StorageBeforeCounter() uint64
- func (mmTopSyncPulse *JetKeeperMock) TopSyncPulse() (p1 insolar.PulseNumber)
- func (mmTopSyncPulse *JetKeeperMock) TopSyncPulseAfterCounter() uint64
- func (mmTopSyncPulse *JetKeeperMock) TopSyncPulseBeforeCounter() uint64
- type JetKeeperMockAddBackupConfirmationExpectation
- type JetKeeperMockAddBackupConfirmationParams
- type JetKeeperMockAddBackupConfirmationResults
- type JetKeeperMockAddDropConfirmationExpectation
- type JetKeeperMockAddDropConfirmationParams
- type JetKeeperMockAddDropConfirmationResults
- type JetKeeperMockAddHotConfirmationExpectation
- type JetKeeperMockAddHotConfirmationParams
- type JetKeeperMockAddHotConfirmationResults
- type JetKeeperMockHasAllJetConfirmsExpectation
- type JetKeeperMockHasAllJetConfirmsParams
- type JetKeeperMockHasAllJetConfirmsResults
- type JetKeeperMockStorageExpectation
- type JetKeeperMockStorageResults
- type JetKeeperMockTopSyncPulseExpectation
- type JetKeeperMockTopSyncPulseResults
- type JetsInfo
- func (*JetsInfo) Descriptor() ([]byte, []int)
- func (this *JetsInfo) Equal(that interface{}) bool
- func (this *JetsInfo) GoString() string
- func (m *JetsInfo) Marshal() (dAtA []byte, err error)
- func (m *JetsInfo) MarshalTo(dAtA []byte) (int, error)
- func (*JetsInfo) ProtoMessage()
- func (m *JetsInfo) Reset()
- func (m *JetsInfo) Size() (n int)
- func (this *JetsInfo) String() string
- func (m *JetsInfo) Unmarshal(dAtA []byte) error
- func (m *JetsInfo) XXX_DiscardUnknown()
- func (m *JetsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JetsInfo) XXX_Merge(src proto.Message)
- func (m *JetsInfo) XXX_Size() int
- func (m *JetsInfo) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAlreadyDone is returned when you try to do backup for pulse less then lastBackupedPulse ErrAlreadyDone = errors.New("backup already done for this pulse") // ErrBackupDisabled is returned when backups are disabled ErrBackupDisabled = errors.New("backup disabled") )
var ( ErrInvalidLengthJetinfo = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowJetinfo = fmt.Errorf("proto: integer overflow") )
Functions ¶
func FinalizePulse ¶
func FinalizePulse(ctx context.Context, pulses pulse.Calculator, backuper BackupMaker, jetKeeper JetKeeper, indexes object.IndexModifier, newPulse insolar.PulseNumber)
FinalizePulse starts backup process if needed
func NewdropTruncaterMock ¶
NewdropTruncaterMock returns a mock for github.com/insolar/insolar/ledger/heavy/executor.headTruncater
Types ¶
type BackupInfo ¶
type BackupInfo struct { // SHA256 is hash of backup file SHA256 string // Pulse is number of backuped pulse Pulse insolar.PulseNumber // LastBackupedVersion is last backaped badger's version\timestamp LastBackupedVersion uint64 // Since is badger's version\timestamp from which we started backup Since uint64 }
BackupInfo contains meta information about current incremental backup
type BackupMaker ¶
type BackupMaker interface { // MakeBackup starts process of incremental backups MakeBackup(ctx context.Context, lastFinalizedPulse insolar.PulseNumber) error }
BackupMaker is interface for doing backups
type BackupMakerDefault ¶
type BackupMakerDefault struct {
// contains filtered or unexported fields
}
BackupMakerDefault is component which does incremental backups by consequent invoke MakeBackup()
func NewBackupMaker ¶
func NewBackupMaker(ctx context.Context, backuper store.Backuper, config configuration.Backup, lastBackupedPulse insolar.PulseNumber) (*BackupMakerDefault, error)
func (*BackupMakerDefault) MakeBackup ¶
func (b *BackupMakerDefault) MakeBackup(ctx context.Context, lastFinalizedPulse insolar.PulseNumber) error
type BackupMakerMock ¶
type BackupMakerMock struct { MakeBackupMock mBackupMakerMockMakeBackup // contains filtered or unexported fields }
BackupMakerMock implements BackupMaker
func NewBackupMakerMock ¶
func NewBackupMakerMock(t minimock.Tester) *BackupMakerMock
NewBackupMakerMock returns a mock for BackupMaker
func (*BackupMakerMock) MakeBackup ¶
func (mmMakeBackup *BackupMakerMock) MakeBackup(ctx context.Context, lastFinalizedPulse insolar.PulseNumber) (err error)
MakeBackup implements BackupMaker
func (*BackupMakerMock) MakeBackupAfterCounter ¶
func (mmMakeBackup *BackupMakerMock) MakeBackupAfterCounter() uint64
MakeBackupAfterCounter returns a count of finished BackupMakerMock.MakeBackup invocations
func (*BackupMakerMock) MakeBackupBeforeCounter ¶
func (mmMakeBackup *BackupMakerMock) MakeBackupBeforeCounter() uint64
MakeBackupBeforeCounter returns a count of BackupMakerMock.MakeBackup invocations
func (*BackupMakerMock) MinimockFinish ¶
func (m *BackupMakerMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*BackupMakerMock) MinimockMakeBackupDone ¶
func (m *BackupMakerMock) MinimockMakeBackupDone() bool
MinimockMakeBackupDone returns true if the count of the MakeBackup invocations corresponds the number of defined expectations
func (*BackupMakerMock) MinimockMakeBackupInspect ¶
func (m *BackupMakerMock) MinimockMakeBackupInspect()
MinimockMakeBackupInspect logs each unmet expectation
func (*BackupMakerMock) MinimockWait ¶
func (m *BackupMakerMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type BackupMakerMockMakeBackupExpectation ¶
type BackupMakerMockMakeBackupExpectation struct { Counter uint64 // contains filtered or unexported fields }
BackupMakerMockMakeBackupExpectation specifies expectation struct of the BackupMaker.MakeBackup
func (*BackupMakerMockMakeBackupExpectation) Then ¶
func (e *BackupMakerMockMakeBackupExpectation) Then(err error) *BackupMakerMock
Then sets up BackupMaker.MakeBackup return parameters for the expectation previously defined by the When method
type BackupMakerMockMakeBackupParams ¶
type BackupMakerMockMakeBackupParams struct {
// contains filtered or unexported fields
}
BackupMakerMockMakeBackupParams contains parameters of the BackupMaker.MakeBackup
type BackupMakerMockMakeBackupResults ¶
type BackupMakerMockMakeBackupResults struct {
// contains filtered or unexported fields
}
BackupMakerMockMakeBackupResults contains results of the BackupMaker.MakeBackup
type DBJetKeeper ¶
type DBJetKeeper struct {
// contains filtered or unexported fields
}
func NewJetKeeper ¶
func NewJetKeeper(jets jet.Storage, db store.DB, pulses insolarPulse.Calculator) *DBJetKeeper
func (*DBJetKeeper) AddBackupConfirmation ¶
func (jk *DBJetKeeper) AddBackupConfirmation(ctx context.Context, pn insolar.PulseNumber) error
AddBackupConfirmation performs adding backup confirmation to storage and checks pulse completion.
func (*DBJetKeeper) AddDropConfirmation ¶
func (jk *DBJetKeeper) AddDropConfirmation(ctx context.Context, pn insolar.PulseNumber, id insolar.JetID, split bool) error
AddDropConfirmation performs adding jet to storage and checks pulse completion.
func (*DBJetKeeper) AddHotConfirmation ¶
func (jk *DBJetKeeper) AddHotConfirmation(ctx context.Context, pn insolar.PulseNumber, id insolar.JetID, split bool) error
func (*DBJetKeeper) HasAllJetConfirms ¶
func (jk *DBJetKeeper) HasAllJetConfirms(ctx context.Context, pulse insolar.PulseNumber) bool
HasJetConfirms says if given pulse has drop and hot confirms. Ignore backups
func (*DBJetKeeper) Storage ¶ added in v0.9.1
func (jk *DBJetKeeper) Storage() jet.Storage
func (*DBJetKeeper) TopSyncPulse ¶
func (jk *DBJetKeeper) TopSyncPulse() insolar.PulseNumber
TopSyncPulse provides access to highest synced (replicated) pulse.
func (*DBJetKeeper) TruncateHead ¶
func (jk *DBJetKeeper) TruncateHead(ctx context.Context, from insolar.PulseNumber) error
type DBRollback ¶
type DBRollback struct {
// contains filtered or unexported fields
}
DBRollback is used for rollback all data which is not finalized It removes all data which was added after pulse which we consider as finalized
func NewDBRollback ¶
func NewDBRollback(jetKeeper JetKeeper, dbs ...headTruncater) *DBRollback
type FinalizationKeeper ¶
type FinalizationKeeper interface {
OnPulse(ctx context.Context, current insolar.PulseNumber) error
}
FinalizationKeeper check how far from each other last finalized pulse and current one and if distance is more than limit it stops network
type FinalizationKeeperDefault ¶
type FinalizationKeeperDefault struct {
// contains filtered or unexported fields
}
func NewFinalizationKeeperDefault ¶
func NewFinalizationKeeperDefault(jk JetKeeper, pc pulse.Calculator, limit int) *FinalizationKeeperDefault
func (*FinalizationKeeperDefault) OnPulse ¶
func (f *FinalizationKeeperDefault) OnPulse(ctx context.Context, current insolar.PulseNumber) error
type HeadTruncaterMock ¶
type HeadTruncaterMock struct { TruncateHeadMock mHeadTruncaterMockTruncateHead // contains filtered or unexported fields }
HeadTruncaterMock implements headTruncater
func NewHeadTruncaterMock ¶
func NewHeadTruncaterMock(t minimock.Tester) *HeadTruncaterMock
NewHeadTruncaterMock returns a mock for headTruncater
func (*HeadTruncaterMock) MinimockFinish ¶
func (m *HeadTruncaterMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*HeadTruncaterMock) MinimockTruncateHeadDone ¶
func (m *HeadTruncaterMock) MinimockTruncateHeadDone() bool
MinimockTruncateHeadDone returns true if the count of the TruncateHead invocations corresponds the number of defined expectations
func (*HeadTruncaterMock) MinimockTruncateHeadInspect ¶
func (m *HeadTruncaterMock) MinimockTruncateHeadInspect()
MinimockTruncateHeadInspect logs each unmet expectation
func (*HeadTruncaterMock) MinimockWait ¶
func (m *HeadTruncaterMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*HeadTruncaterMock) TruncateHead ¶
func (mmTruncateHead *HeadTruncaterMock) TruncateHead(ctx context.Context, from insolar.PulseNumber) (err error)
TruncateHead implements headTruncater
func (*HeadTruncaterMock) TruncateHeadAfterCounter ¶
func (mmTruncateHead *HeadTruncaterMock) TruncateHeadAfterCounter() uint64
TruncateHeadAfterCounter returns a count of finished HeadTruncaterMock.TruncateHead invocations
func (*HeadTruncaterMock) TruncateHeadBeforeCounter ¶
func (mmTruncateHead *HeadTruncaterMock) TruncateHeadBeforeCounter() uint64
TruncateHeadBeforeCounter returns a count of HeadTruncaterMock.TruncateHead invocations
type HeadTruncaterMockTruncateHeadExpectation ¶
type HeadTruncaterMockTruncateHeadExpectation struct { Counter uint64 // contains filtered or unexported fields }
HeadTruncaterMockTruncateHeadExpectation specifies expectation struct of the headTruncater.TruncateHead
func (*HeadTruncaterMockTruncateHeadExpectation) Then ¶
func (e *HeadTruncaterMockTruncateHeadExpectation) Then(err error) *HeadTruncaterMock
Then sets up headTruncater.TruncateHead return parameters for the expectation previously defined by the When method
type HeadTruncaterMockTruncateHeadParams ¶
type HeadTruncaterMockTruncateHeadParams struct {
// contains filtered or unexported fields
}
HeadTruncaterMockTruncateHeadParams contains parameters of the headTruncater.TruncateHead
type HeadTruncaterMockTruncateHeadResults ¶
type HeadTruncaterMockTruncateHeadResults struct {
// contains filtered or unexported fields
}
HeadTruncaterMockTruncateHeadResults contains results of the headTruncater.TruncateHead
type HeavyReplicator ¶
type HeavyReplicator interface { // NotifyAboutMessage is method for notifying a sync component about new data. NotifyAboutMessage(context.Context, *payload.Replication) // Stop stops the component. Stop() }
HeavyReplicator is a base interface for a heavy sync component.
type HeavyReplicatorDefault ¶
type HeavyReplicatorDefault struct {
// contains filtered or unexported fields
}
HeavyReplicatorDefault is a base impl for HeavyReplicator
func NewHeavyReplicatorDefault ¶
func NewHeavyReplicatorDefault( records object.RecordModifier, indexes object.IndexModifier, pcs insolar.PlatformCryptographyScheme, pulseCalculator pulse.Calculator, drops drop.Modifier, keeper JetKeeper, backuper BackupMaker, jets jet.Modifier, ) *HeavyReplicatorDefault
NewHeavyReplicatorDefault creates new instance of HeavyReplicatorDefault.
func (*HeavyReplicatorDefault) NotifyAboutMessage ¶
func (h *HeavyReplicatorDefault) NotifyAboutMessage(ctx context.Context, msg *payload.Replication)
NotifyAboutMessage is method for notifying a sync component about new data.
func (*HeavyReplicatorDefault) Stop ¶
func (h *HeavyReplicatorDefault) Stop()
Stop stops the component.
type InitialState ¶
type InitialStateAccessor ¶
type InitialStateAccessor interface { // Get method returns InitialState filled only with data for passed light node // If node isn't lightExecutor for any jets - arrays in InitialState will be empty // Passed pulse is current pulse for checking light executor for jets (not a topSyncPulse) Get(ctx context.Context, lightExecutor insolar.Reference, pulse insolar.PulseNumber) *InitialState }
InitialStateAccessor interface can receive initial state for lights
type InitialStateAccessorMock ¶
type InitialStateAccessorMock struct { GetMock mInitialStateAccessorMockGet // contains filtered or unexported fields }
InitialStateAccessorMock implements InitialStateAccessor
func NewInitialStateAccessorMock ¶
func NewInitialStateAccessorMock(t minimock.Tester) *InitialStateAccessorMock
NewInitialStateAccessorMock returns a mock for InitialStateAccessor
func (*InitialStateAccessorMock) Get ¶
func (mmGet *InitialStateAccessorMock) Get(ctx context.Context, lightExecutor insolar.Reference, pulse insolar.PulseNumber) (ip1 *InitialState)
Get implements InitialStateAccessor
func (*InitialStateAccessorMock) GetAfterCounter ¶
func (mmGet *InitialStateAccessorMock) GetAfterCounter() uint64
GetAfterCounter returns a count of finished InitialStateAccessorMock.Get invocations
func (*InitialStateAccessorMock) GetBeforeCounter ¶
func (mmGet *InitialStateAccessorMock) GetBeforeCounter() uint64
GetBeforeCounter returns a count of InitialStateAccessorMock.Get invocations
func (*InitialStateAccessorMock) MinimockFinish ¶
func (m *InitialStateAccessorMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*InitialStateAccessorMock) MinimockGetDone ¶
func (m *InitialStateAccessorMock) MinimockGetDone() bool
MinimockGetDone returns true if the count of the Get invocations corresponds the number of defined expectations
func (*InitialStateAccessorMock) MinimockGetInspect ¶
func (m *InitialStateAccessorMock) MinimockGetInspect()
MinimockGetInspect logs each unmet expectation
func (*InitialStateAccessorMock) MinimockWait ¶
func (m *InitialStateAccessorMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type InitialStateAccessorMockGetExpectation ¶
type InitialStateAccessorMockGetExpectation struct { Counter uint64 // contains filtered or unexported fields }
InitialStateAccessorMockGetExpectation specifies expectation struct of the InitialStateAccessor.Get
func (*InitialStateAccessorMockGetExpectation) Then ¶
func (e *InitialStateAccessorMockGetExpectation) Then(ip1 *InitialState) *InitialStateAccessorMock
Then sets up InitialStateAccessor.Get return parameters for the expectation previously defined by the When method
type InitialStateAccessorMockGetParams ¶
type InitialStateAccessorMockGetParams struct {
// contains filtered or unexported fields
}
InitialStateAccessorMockGetParams contains parameters of the InitialStateAccessor.Get
type InitialStateAccessorMockGetResults ¶
type InitialStateAccessorMockGetResults struct {
// contains filtered or unexported fields
}
InitialStateAccessorMockGetResults contains results of the InitialStateAccessor.Get
type InitialStateKeeper ¶
type InitialStateKeeper struct {
// contains filtered or unexported fields
}
InitialStateKeeper prepares state for LMEs
func NewInitialStateKeeper ¶
func NewInitialStateKeeper( jetKeeper JetKeeper, jetAccessor jet.Accessor, jetCoordinator jet.Coordinator, indexStorage object.IndexAccessor, dropStorage drop.Accessor, ) *InitialStateKeeper
func (*InitialStateKeeper) Get ¶
func (isk *InitialStateKeeper) Get(ctx context.Context, lightExecutor insolar.Reference, pulse insolar.PulseNumber) *InitialState
type JetInfo ¶
type JetInfo struct { Polymorph int32 `protobuf:"varint,16,opt,name=polymorph,proto3" json:"polymorph,omitempty"` JetID github_com_insolar_insolar_insolar.JetID `protobuf:"bytes,20,opt,name=JetID,proto3,customtype=github.com/insolar/insolar/insolar.JetID" json:"JetID"` HotConfirmed []github_com_insolar_insolar_insolar.JetID `protobuf:"bytes,21,rep,name=HotConfirmed,proto3,customtype=github.com/insolar/insolar/insolar.JetID" json:"HotConfirmed"` DropConfirmed bool `protobuf:"varint,22,opt,name=DropConfirmed,proto3" json:"DropConfirmed,omitempty"` BackupConfirmed bool `protobuf:"varint,23,opt,name=BackupConfirmed,proto3" json:"BackupConfirmed,omitempty"` Split bool `protobuf:"varint,24,opt,name=Split,proto3" json:"Split,omitempty"` IsSplitSet bool `protobuf:"varint,25,opt,name=IsSplitSet,proto3" json:"IsSplitSet,omitempty"` }
func (*JetInfo) Descriptor ¶
func (*JetInfo) ProtoMessage ¶
func (*JetInfo) ProtoMessage()
func (*JetInfo) XXX_DiscardUnknown ¶
func (m *JetInfo) XXX_DiscardUnknown()
func (*JetInfo) XXX_Marshal ¶
func (*JetInfo) XXX_Unmarshal ¶
type JetKeeper ¶
type JetKeeper interface { // AddDropConfirmation performs adding jet to storage and checks pulse completion. AddDropConfirmation(ctx context.Context, pn insolar.PulseNumber, jet insolar.JetID, split bool) error // AddHotConfirmation performs adding hot confirmation to storage and checks pulse completion. AddHotConfirmation(ctx context.Context, pn insolar.PulseNumber, jet insolar.JetID, split bool) error // AddBackupConfirmation performs adding backup confirmation to storage and checks pulse completion. AddBackupConfirmation(ctx context.Context, pn insolar.PulseNumber) error // TopSyncPulse provides access to highest synced (replicated) pulse. TopSyncPulse() insolar.PulseNumber // HasAllJetConfirms says if given pulse has drop and hot confirms. Ignore backups HasAllJetConfirms(ctx context.Context, pn insolar.PulseNumber) bool // Storage returns jets storage Storage() jet.Storage }
JetKeeper provides a method for adding jet to storage, checking pulse completion and getting access to highest synced pulse.
type JetKeeperMock ¶
type JetKeeperMock struct { AddBackupConfirmationMock mJetKeeperMockAddBackupConfirmation AddDropConfirmationMock mJetKeeperMockAddDropConfirmation AddHotConfirmationMock mJetKeeperMockAddHotConfirmation HasAllJetConfirmsMock mJetKeeperMockHasAllJetConfirms StorageMock mJetKeeperMockStorage TopSyncPulseMock mJetKeeperMockTopSyncPulse // contains filtered or unexported fields }
JetKeeperMock implements JetKeeper
func NewJetKeeperMock ¶
func NewJetKeeperMock(t minimock.Tester) *JetKeeperMock
NewJetKeeperMock returns a mock for JetKeeper
func (*JetKeeperMock) AddBackupConfirmation ¶
func (mmAddBackupConfirmation *JetKeeperMock) AddBackupConfirmation(ctx context.Context, pn insolar.PulseNumber) (err error)
AddBackupConfirmation implements JetKeeper
func (*JetKeeperMock) AddBackupConfirmationAfterCounter ¶
func (mmAddBackupConfirmation *JetKeeperMock) AddBackupConfirmationAfterCounter() uint64
AddBackupConfirmationAfterCounter returns a count of finished JetKeeperMock.AddBackupConfirmation invocations
func (*JetKeeperMock) AddBackupConfirmationBeforeCounter ¶
func (mmAddBackupConfirmation *JetKeeperMock) AddBackupConfirmationBeforeCounter() uint64
AddBackupConfirmationBeforeCounter returns a count of JetKeeperMock.AddBackupConfirmation invocations
func (*JetKeeperMock) AddDropConfirmation ¶
func (mmAddDropConfirmation *JetKeeperMock) AddDropConfirmation(ctx context.Context, pn insolar.PulseNumber, jet insolar.JetID, split bool) (err error)
AddDropConfirmation implements JetKeeper
func (*JetKeeperMock) AddDropConfirmationAfterCounter ¶
func (mmAddDropConfirmation *JetKeeperMock) AddDropConfirmationAfterCounter() uint64
AddDropConfirmationAfterCounter returns a count of finished JetKeeperMock.AddDropConfirmation invocations
func (*JetKeeperMock) AddDropConfirmationBeforeCounter ¶
func (mmAddDropConfirmation *JetKeeperMock) AddDropConfirmationBeforeCounter() uint64
AddDropConfirmationBeforeCounter returns a count of JetKeeperMock.AddDropConfirmation invocations
func (*JetKeeperMock) AddHotConfirmation ¶
func (mmAddHotConfirmation *JetKeeperMock) AddHotConfirmation(ctx context.Context, pn insolar.PulseNumber, jet insolar.JetID, split bool) (err error)
AddHotConfirmation implements JetKeeper
func (*JetKeeperMock) AddHotConfirmationAfterCounter ¶
func (mmAddHotConfirmation *JetKeeperMock) AddHotConfirmationAfterCounter() uint64
AddHotConfirmationAfterCounter returns a count of finished JetKeeperMock.AddHotConfirmation invocations
func (*JetKeeperMock) AddHotConfirmationBeforeCounter ¶
func (mmAddHotConfirmation *JetKeeperMock) AddHotConfirmationBeforeCounter() uint64
AddHotConfirmationBeforeCounter returns a count of JetKeeperMock.AddHotConfirmation invocations
func (*JetKeeperMock) HasAllJetConfirms ¶
func (mmHasAllJetConfirms *JetKeeperMock) HasAllJetConfirms(ctx context.Context, pn insolar.PulseNumber) (b1 bool)
HasAllJetConfirms implements JetKeeper
func (*JetKeeperMock) HasAllJetConfirmsAfterCounter ¶
func (mmHasAllJetConfirms *JetKeeperMock) HasAllJetConfirmsAfterCounter() uint64
HasAllJetConfirmsAfterCounter returns a count of finished JetKeeperMock.HasAllJetConfirms invocations
func (*JetKeeperMock) HasAllJetConfirmsBeforeCounter ¶
func (mmHasAllJetConfirms *JetKeeperMock) HasAllJetConfirmsBeforeCounter() uint64
HasAllJetConfirmsBeforeCounter returns a count of JetKeeperMock.HasAllJetConfirms invocations
func (*JetKeeperMock) MinimockAddBackupConfirmationDone ¶
func (m *JetKeeperMock) MinimockAddBackupConfirmationDone() bool
MinimockAddBackupConfirmationDone returns true if the count of the AddBackupConfirmation invocations corresponds the number of defined expectations
func (*JetKeeperMock) MinimockAddBackupConfirmationInspect ¶
func (m *JetKeeperMock) MinimockAddBackupConfirmationInspect()
MinimockAddBackupConfirmationInspect logs each unmet expectation
func (*JetKeeperMock) MinimockAddDropConfirmationDone ¶
func (m *JetKeeperMock) MinimockAddDropConfirmationDone() bool
MinimockAddDropConfirmationDone returns true if the count of the AddDropConfirmation invocations corresponds the number of defined expectations
func (*JetKeeperMock) MinimockAddDropConfirmationInspect ¶
func (m *JetKeeperMock) MinimockAddDropConfirmationInspect()
MinimockAddDropConfirmationInspect logs each unmet expectation
func (*JetKeeperMock) MinimockAddHotConfirmationDone ¶
func (m *JetKeeperMock) MinimockAddHotConfirmationDone() bool
MinimockAddHotConfirmationDone returns true if the count of the AddHotConfirmation invocations corresponds the number of defined expectations
func (*JetKeeperMock) MinimockAddHotConfirmationInspect ¶
func (m *JetKeeperMock) MinimockAddHotConfirmationInspect()
MinimockAddHotConfirmationInspect logs each unmet expectation
func (*JetKeeperMock) MinimockFinish ¶
func (m *JetKeeperMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*JetKeeperMock) MinimockHasAllJetConfirmsDone ¶
func (m *JetKeeperMock) MinimockHasAllJetConfirmsDone() bool
MinimockHasAllJetConfirmsDone returns true if the count of the HasAllJetConfirms invocations corresponds the number of defined expectations
func (*JetKeeperMock) MinimockHasAllJetConfirmsInspect ¶
func (m *JetKeeperMock) MinimockHasAllJetConfirmsInspect()
MinimockHasAllJetConfirmsInspect logs each unmet expectation
func (*JetKeeperMock) MinimockStorageDone ¶ added in v0.9.1
func (m *JetKeeperMock) MinimockStorageDone() bool
MinimockStorageDone returns true if the count of the Storage invocations corresponds the number of defined expectations
func (*JetKeeperMock) MinimockStorageInspect ¶ added in v0.9.1
func (m *JetKeeperMock) MinimockStorageInspect()
MinimockStorageInspect logs each unmet expectation
func (*JetKeeperMock) MinimockTopSyncPulseDone ¶
func (m *JetKeeperMock) MinimockTopSyncPulseDone() bool
MinimockTopSyncPulseDone returns true if the count of the TopSyncPulse invocations corresponds the number of defined expectations
func (*JetKeeperMock) MinimockTopSyncPulseInspect ¶
func (m *JetKeeperMock) MinimockTopSyncPulseInspect()
MinimockTopSyncPulseInspect logs each unmet expectation
func (*JetKeeperMock) MinimockWait ¶
func (m *JetKeeperMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*JetKeeperMock) Storage ¶ added in v0.9.1
func (mmStorage *JetKeeperMock) Storage() (s1 jet.Storage)
Storage implements JetKeeper
func (*JetKeeperMock) StorageAfterCounter ¶ added in v0.9.1
func (mmStorage *JetKeeperMock) StorageAfterCounter() uint64
StorageAfterCounter returns a count of finished JetKeeperMock.Storage invocations
func (*JetKeeperMock) StorageBeforeCounter ¶ added in v0.9.1
func (mmStorage *JetKeeperMock) StorageBeforeCounter() uint64
StorageBeforeCounter returns a count of JetKeeperMock.Storage invocations
func (*JetKeeperMock) TopSyncPulse ¶
func (mmTopSyncPulse *JetKeeperMock) TopSyncPulse() (p1 insolar.PulseNumber)
TopSyncPulse implements JetKeeper
func (*JetKeeperMock) TopSyncPulseAfterCounter ¶
func (mmTopSyncPulse *JetKeeperMock) TopSyncPulseAfterCounter() uint64
TopSyncPulseAfterCounter returns a count of finished JetKeeperMock.TopSyncPulse invocations
func (*JetKeeperMock) TopSyncPulseBeforeCounter ¶
func (mmTopSyncPulse *JetKeeperMock) TopSyncPulseBeforeCounter() uint64
TopSyncPulseBeforeCounter returns a count of JetKeeperMock.TopSyncPulse invocations
type JetKeeperMockAddBackupConfirmationExpectation ¶
type JetKeeperMockAddBackupConfirmationExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetKeeperMockAddBackupConfirmationExpectation specifies expectation struct of the JetKeeper.AddBackupConfirmation
func (*JetKeeperMockAddBackupConfirmationExpectation) Then ¶
func (e *JetKeeperMockAddBackupConfirmationExpectation) Then(err error) *JetKeeperMock
Then sets up JetKeeper.AddBackupConfirmation return parameters for the expectation previously defined by the When method
type JetKeeperMockAddBackupConfirmationParams ¶
type JetKeeperMockAddBackupConfirmationParams struct {
// contains filtered or unexported fields
}
JetKeeperMockAddBackupConfirmationParams contains parameters of the JetKeeper.AddBackupConfirmation
type JetKeeperMockAddBackupConfirmationResults ¶
type JetKeeperMockAddBackupConfirmationResults struct {
// contains filtered or unexported fields
}
JetKeeperMockAddBackupConfirmationResults contains results of the JetKeeper.AddBackupConfirmation
type JetKeeperMockAddDropConfirmationExpectation ¶
type JetKeeperMockAddDropConfirmationExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetKeeperMockAddDropConfirmationExpectation specifies expectation struct of the JetKeeper.AddDropConfirmation
func (*JetKeeperMockAddDropConfirmationExpectation) Then ¶
func (e *JetKeeperMockAddDropConfirmationExpectation) Then(err error) *JetKeeperMock
Then sets up JetKeeper.AddDropConfirmation return parameters for the expectation previously defined by the When method
type JetKeeperMockAddDropConfirmationParams ¶
type JetKeeperMockAddDropConfirmationParams struct {
// contains filtered or unexported fields
}
JetKeeperMockAddDropConfirmationParams contains parameters of the JetKeeper.AddDropConfirmation
type JetKeeperMockAddDropConfirmationResults ¶
type JetKeeperMockAddDropConfirmationResults struct {
// contains filtered or unexported fields
}
JetKeeperMockAddDropConfirmationResults contains results of the JetKeeper.AddDropConfirmation
type JetKeeperMockAddHotConfirmationExpectation ¶
type JetKeeperMockAddHotConfirmationExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetKeeperMockAddHotConfirmationExpectation specifies expectation struct of the JetKeeper.AddHotConfirmation
func (*JetKeeperMockAddHotConfirmationExpectation) Then ¶
func (e *JetKeeperMockAddHotConfirmationExpectation) Then(err error) *JetKeeperMock
Then sets up JetKeeper.AddHotConfirmation return parameters for the expectation previously defined by the When method
type JetKeeperMockAddHotConfirmationParams ¶
type JetKeeperMockAddHotConfirmationParams struct {
// contains filtered or unexported fields
}
JetKeeperMockAddHotConfirmationParams contains parameters of the JetKeeper.AddHotConfirmation
type JetKeeperMockAddHotConfirmationResults ¶
type JetKeeperMockAddHotConfirmationResults struct {
// contains filtered or unexported fields
}
JetKeeperMockAddHotConfirmationResults contains results of the JetKeeper.AddHotConfirmation
type JetKeeperMockHasAllJetConfirmsExpectation ¶
type JetKeeperMockHasAllJetConfirmsExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetKeeperMockHasAllJetConfirmsExpectation specifies expectation struct of the JetKeeper.HasAllJetConfirms
func (*JetKeeperMockHasAllJetConfirmsExpectation) Then ¶
func (e *JetKeeperMockHasAllJetConfirmsExpectation) Then(b1 bool) *JetKeeperMock
Then sets up JetKeeper.HasAllJetConfirms return parameters for the expectation previously defined by the When method
type JetKeeperMockHasAllJetConfirmsParams ¶
type JetKeeperMockHasAllJetConfirmsParams struct {
// contains filtered or unexported fields
}
JetKeeperMockHasAllJetConfirmsParams contains parameters of the JetKeeper.HasAllJetConfirms
type JetKeeperMockHasAllJetConfirmsResults ¶
type JetKeeperMockHasAllJetConfirmsResults struct {
// contains filtered or unexported fields
}
JetKeeperMockHasAllJetConfirmsResults contains results of the JetKeeper.HasAllJetConfirms
type JetKeeperMockStorageExpectation ¶ added in v0.9.1
type JetKeeperMockStorageExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetKeeperMockStorageExpectation specifies expectation struct of the JetKeeper.Storage
type JetKeeperMockStorageResults ¶ added in v0.9.1
type JetKeeperMockStorageResults struct {
// contains filtered or unexported fields
}
JetKeeperMockStorageResults contains results of the JetKeeper.Storage
type JetKeeperMockTopSyncPulseExpectation ¶
type JetKeeperMockTopSyncPulseExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetKeeperMockTopSyncPulseExpectation specifies expectation struct of the JetKeeper.TopSyncPulse
type JetKeeperMockTopSyncPulseResults ¶
type JetKeeperMockTopSyncPulseResults struct {
// contains filtered or unexported fields
}
JetKeeperMockTopSyncPulseResults contains results of the JetKeeper.TopSyncPulse
type JetsInfo ¶
type JetsInfo struct { Polymorph int32 `protobuf:"varint,16,opt,name=polymorph,proto3" json:"polymorph,omitempty"` Jets []JetInfo `protobuf:"bytes,20,rep,name=Jets,proto3" json:"Jets"` }
func (*JetsInfo) Descriptor ¶
func (*JetsInfo) ProtoMessage ¶
func (*JetsInfo) ProtoMessage()
func (*JetsInfo) XXX_DiscardUnknown ¶
func (m *JetsInfo) XXX_DiscardUnknown()