Documentation ¶
Index ¶
- Constants
- type Catalog
- type CatalogMock
- func (mmCreate *CatalogMock) Create(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor)
- func (mmCreate *CatalogMock) CreateAfterCounter() uint64
- func (mmCreate *CatalogMock) CreateBeforeCounter() uint64
- func (mmGet *CatalogMock) Get(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor)
- func (mmGet *CatalogMock) GetAfterCounter() uint64
- func (mmGet *CatalogMock) GetBeforeCounter() uint64
- func (mmGetOrCreate *CatalogMock) GetOrCreate(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor)
- func (mmGetOrCreate *CatalogMock) GetOrCreateAfterCounter() uint64
- func (mmGetOrCreate *CatalogMock) GetOrCreateBeforeCounter() uint64
- func (m *CatalogMock) MinimockCreateDone() bool
- func (m *CatalogMock) MinimockCreateInspect()
- func (m *CatalogMock) MinimockFinish()
- func (m *CatalogMock) MinimockGetDone() bool
- func (m *CatalogMock) MinimockGetInspect()
- func (m *CatalogMock) MinimockGetOrCreateDone() bool
- func (m *CatalogMock) MinimockGetOrCreateInspect()
- func (m *CatalogMock) MinimockTryGetDone() bool
- func (m *CatalogMock) MinimockTryGetInspect()
- func (m *CatalogMock) MinimockWait(timeout mm_time.Duration)
- func (mmTryGet *CatalogMock) TryGet(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor, b1 bool)
- func (mmTryGet *CatalogMock) TryGetAfterCounter() uint64
- func (mmTryGet *CatalogMock) TryGetBeforeCounter() uint64
- type CatalogMockAccessType
- type CatalogMockCreateExpectation
- type CatalogMockCreateParams
- type CatalogMockCreateResults
- type CatalogMockGetExpectation
- type CatalogMockGetOrCreateExpectation
- type CatalogMockGetOrCreateParams
- type CatalogMockGetOrCreateResults
- type CatalogMockGetParams
- type CatalogMockGetResults
- type CatalogMockTryGetExpectation
- type CatalogMockTryGetParams
- type CatalogMockTryGetResults
- type CatalogMockWrapper
- type Info
- func (i *Info) BuildLatestDirtyState() *rms.ObjectState
- func (i *Info) BuildStateReport() rms.VStateReport
- func (i *Info) DescriptorDirty() descriptor.Object
- func (i *Info) DescriptorValidated() descriptor.Object
- func (i *Info) FinishRequest(isolation contract.MethodIsolation, requestRef reference.Global, ...)
- func (i Info) GetEarliestPulse(tolerance isolation.InterferenceFlag) pulse.Number
- func (i *Info) GetState() State
- func (i *Info) IsReady() bool
- func (i *Info) SetDescriptorDirty(objectDescriptor descriptor.Object)
- func (i *Info) SetDescriptorValidated(objectDescriptor descriptor.Object)
- func (i *Info) SetState(state State)
- type LocalCatalog
- func (p LocalCatalog) Create(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor
- func (p LocalCatalog) Get(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor
- func (p LocalCatalog) GetOrCreate(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor
- func (p LocalCatalog) TryGet(ctx smachine.ExecutionContext, objectReference reference.Global) (SharedStateAccessor, bool)
- type SMObject
- func (sm *SMObject) GetInitStateFor(smachine.StateMachine) smachine.InitFunc
- func (sm *SMObject) GetStateMachineDeclaration() smachine.StateMachineDeclaration
- func (sm *SMObject) Init(ctx smachine.InitializationContext) smachine.StateUpdate
- func (sm *SMObject) InjectDependencies(stateMachine smachine.StateMachine, _ smachine.SlotLink, ...)
- type SharedState
- type SharedStateAccessor
- type State
Constants ¶
const UnorderedMaxParallelism = 30
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog interface { Get(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor TryGet(ctx smachine.ExecutionContext, objectReference reference.Global) (SharedStateAccessor, bool) Create(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor GetOrCreate(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor }
type CatalogMock ¶
type CatalogMock struct { CreateMock mCatalogMockCreate GetMock mCatalogMockGet GetOrCreateMock mCatalogMockGetOrCreate TryGetMock mCatalogMockTryGet // contains filtered or unexported fields }
CatalogMock implements Catalog
func NewCatalogMock ¶
func NewCatalogMock(t minimock.Tester) *CatalogMock
NewCatalogMock returns a mock for Catalog
func (*CatalogMock) Create ¶
func (mmCreate *CatalogMock) Create(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor)
Create implements Catalog
func (*CatalogMock) CreateAfterCounter ¶
func (mmCreate *CatalogMock) CreateAfterCounter() uint64
CreateAfterCounter returns a count of finished CatalogMock.Create invocations
func (*CatalogMock) CreateBeforeCounter ¶
func (mmCreate *CatalogMock) CreateBeforeCounter() uint64
CreateBeforeCounter returns a count of CatalogMock.Create invocations
func (*CatalogMock) Get ¶
func (mmGet *CatalogMock) Get(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor)
Get implements Catalog
func (*CatalogMock) GetAfterCounter ¶
func (mmGet *CatalogMock) GetAfterCounter() uint64
GetAfterCounter returns a count of finished CatalogMock.Get invocations
func (*CatalogMock) GetBeforeCounter ¶
func (mmGet *CatalogMock) GetBeforeCounter() uint64
GetBeforeCounter returns a count of CatalogMock.Get invocations
func (*CatalogMock) GetOrCreate ¶
func (mmGetOrCreate *CatalogMock) GetOrCreate(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor)
GetOrCreate implements Catalog
func (*CatalogMock) GetOrCreateAfterCounter ¶
func (mmGetOrCreate *CatalogMock) GetOrCreateAfterCounter() uint64
GetOrCreateAfterCounter returns a count of finished CatalogMock.GetOrCreate invocations
func (*CatalogMock) GetOrCreateBeforeCounter ¶
func (mmGetOrCreate *CatalogMock) GetOrCreateBeforeCounter() uint64
GetOrCreateBeforeCounter returns a count of CatalogMock.GetOrCreate invocations
func (*CatalogMock) MinimockCreateDone ¶
func (m *CatalogMock) MinimockCreateDone() bool
MinimockCreateDone returns true if the count of the Create invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockCreateInspect ¶
func (m *CatalogMock) MinimockCreateInspect()
MinimockCreateInspect logs each unmet expectation
func (*CatalogMock) MinimockFinish ¶
func (m *CatalogMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*CatalogMock) MinimockGetDone ¶
func (m *CatalogMock) MinimockGetDone() bool
MinimockGetDone returns true if the count of the Get invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockGetInspect ¶
func (m *CatalogMock) MinimockGetInspect()
MinimockGetInspect logs each unmet expectation
func (*CatalogMock) MinimockGetOrCreateDone ¶
func (m *CatalogMock) MinimockGetOrCreateDone() bool
MinimockGetOrCreateDone returns true if the count of the GetOrCreate invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockGetOrCreateInspect ¶
func (m *CatalogMock) MinimockGetOrCreateInspect()
MinimockGetOrCreateInspect logs each unmet expectation
func (*CatalogMock) MinimockTryGetDone ¶
func (m *CatalogMock) MinimockTryGetDone() bool
MinimockTryGetDone returns true if the count of the TryGet invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockTryGetInspect ¶
func (m *CatalogMock) MinimockTryGetInspect()
MinimockTryGetInspect logs each unmet expectation
func (*CatalogMock) MinimockWait ¶
func (m *CatalogMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*CatalogMock) TryGet ¶
func (mmTryGet *CatalogMock) TryGet(e1 smachine.ExecutionContext, objectReference reference.Global) (s1 SharedStateAccessor, b1 bool)
TryGet implements Catalog
func (*CatalogMock) TryGetAfterCounter ¶
func (mmTryGet *CatalogMock) TryGetAfterCounter() uint64
TryGetAfterCounter returns a count of finished CatalogMock.TryGet invocations
func (*CatalogMock) TryGetBeforeCounter ¶
func (mmTryGet *CatalogMock) TryGetBeforeCounter() uint64
TryGetBeforeCounter returns a count of CatalogMock.TryGet invocations
type CatalogMockAccessType ¶
type CatalogMockAccessType int
const ( CatalogMockAccessGetOrCreate CatalogMockAccessType = iota CatalogMockAccessTryGet )
type CatalogMockCreateExpectation ¶
type CatalogMockCreateExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockCreateExpectation specifies expectation struct of the Catalog.Create
func (*CatalogMockCreateExpectation) Then ¶
func (e *CatalogMockCreateExpectation) Then(s1 SharedStateAccessor) *CatalogMock
Then sets up Catalog.Create return parameters for the expectation previously defined by the When method
type CatalogMockCreateParams ¶
type CatalogMockCreateParams struct {
// contains filtered or unexported fields
}
CatalogMockCreateParams contains parameters of the Catalog.Create
type CatalogMockCreateResults ¶
type CatalogMockCreateResults struct {
// contains filtered or unexported fields
}
CatalogMockCreateResults contains results of the Catalog.Create
type CatalogMockGetExpectation ¶
type CatalogMockGetExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockGetExpectation specifies expectation struct of the Catalog.Get
func (*CatalogMockGetExpectation) Then ¶
func (e *CatalogMockGetExpectation) Then(s1 SharedStateAccessor) *CatalogMock
Then sets up Catalog.Get return parameters for the expectation previously defined by the When method
type CatalogMockGetOrCreateExpectation ¶
type CatalogMockGetOrCreateExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockGetOrCreateExpectation specifies expectation struct of the Catalog.GetOrCreate
func (*CatalogMockGetOrCreateExpectation) Then ¶
func (e *CatalogMockGetOrCreateExpectation) Then(s1 SharedStateAccessor) *CatalogMock
Then sets up Catalog.GetOrCreate return parameters for the expectation previously defined by the When method
type CatalogMockGetOrCreateParams ¶
type CatalogMockGetOrCreateParams struct {
// contains filtered or unexported fields
}
CatalogMockGetOrCreateParams contains parameters of the Catalog.GetOrCreate
type CatalogMockGetOrCreateResults ¶
type CatalogMockGetOrCreateResults struct {
// contains filtered or unexported fields
}
CatalogMockGetOrCreateResults contains results of the Catalog.GetOrCreate
type CatalogMockGetParams ¶
type CatalogMockGetParams struct {
// contains filtered or unexported fields
}
CatalogMockGetParams contains parameters of the Catalog.Get
type CatalogMockGetResults ¶
type CatalogMockGetResults struct {
// contains filtered or unexported fields
}
CatalogMockGetResults contains results of the Catalog.Get
type CatalogMockTryGetExpectation ¶
type CatalogMockTryGetExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockTryGetExpectation specifies expectation struct of the Catalog.TryGet
func (*CatalogMockTryGetExpectation) Then ¶
func (e *CatalogMockTryGetExpectation) Then(s1 SharedStateAccessor, b1 bool) *CatalogMock
Then sets up Catalog.TryGet return parameters for the expectation previously defined by the When method
type CatalogMockTryGetParams ¶
type CatalogMockTryGetParams struct {
// contains filtered or unexported fields
}
CatalogMockTryGetParams contains parameters of the Catalog.TryGet
type CatalogMockTryGetResults ¶
type CatalogMockTryGetResults struct {
// contains filtered or unexported fields
}
CatalogMockTryGetResults contains results of the Catalog.TryGet
type CatalogMockWrapper ¶
type CatalogMockWrapper struct {
// contains filtered or unexported fields
}
func NewCatalogMockWrapper ¶
func NewCatalogMockWrapper(t minimock.Tester) *CatalogMockWrapper
func (*CatalogMockWrapper) AddObject ¶
func (m *CatalogMockWrapper) AddObject(objectRef reference.Global, objectAccessor SharedStateAccessor) *CatalogMockWrapper
func (*CatalogMockWrapper) AllowAccessMode ¶
func (m *CatalogMockWrapper) AllowAccessMode(mode CatalogMockAccessType)
func (*CatalogMockWrapper) CheckDone ¶
func (m *CatalogMockWrapper) CheckDone() error
func (*CatalogMockWrapper) Mock ¶
func (m *CatalogMockWrapper) Mock() *CatalogMock
type Info ¶
type Info struct { Reference reference.Global UnorderedExecute smachine.SyncLink OrderedExecute smachine.SyncLink ReadyToWork smachine.SyncLink SummaryDone smachine.SyncLink PendingConstructorFinished smachine.SyncLink SignalOrderedPendingFinished smachine.BargeInWithParam // KnownRequests holds requests that were seen on current pulse KnownRequests callregistry.WorkingTable // PendingTable holds requests that are known to be processed by other executors PendingTable callregistry.PendingTable PreviousExecutorUnorderedPendingCount uint8 PreviousExecutorOrderedPendingCount uint8 UnorderedPendingEarliestPulse pulse.Number OrderedPendingEarliestPulse pulse.Number Transcript validation.Transcript // contains filtered or unexported fields }
func (*Info) BuildLatestDirtyState ¶
func (i *Info) BuildLatestDirtyState() *rms.ObjectState
func (*Info) BuildStateReport ¶
func (i *Info) BuildStateReport() rms.VStateReport
func (*Info) DescriptorDirty ¶
func (i *Info) DescriptorDirty() descriptor.Object
func (*Info) DescriptorValidated ¶
func (i *Info) DescriptorValidated() descriptor.Object
func (*Info) FinishRequest ¶
func (i *Info) FinishRequest( isolation contract.MethodIsolation, requestRef reference.Global, result *rms.VCallResult, )
func (Info) GetEarliestPulse ¶
func (i Info) GetEarliestPulse(tolerance isolation.InterferenceFlag) pulse.Number
func (*Info) SetDescriptorDirty ¶
func (i *Info) SetDescriptorDirty(objectDescriptor descriptor.Object)
func (*Info) SetDescriptorValidated ¶
func (i *Info) SetDescriptorValidated(objectDescriptor descriptor.Object)
type LocalCatalog ¶
type LocalCatalog struct{}
func NewLocalCatalog ¶
func NewLocalCatalog() *LocalCatalog
func (LocalCatalog) Create ¶
func (p LocalCatalog) Create(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor
func (LocalCatalog) Get ¶
func (p LocalCatalog) Get(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor
func (LocalCatalog) GetOrCreate ¶
func (p LocalCatalog) GetOrCreate(ctx smachine.ExecutionContext, objectReference reference.Global) SharedStateAccessor
func (LocalCatalog) TryGet ¶
func (p LocalCatalog) TryGet(ctx smachine.ExecutionContext, objectReference reference.Global) (SharedStateAccessor, bool)
type SMObject ¶
type SMObject struct { smachine.StateMachineDeclTemplate // contains filtered or unexported fields }
func NewStateMachineObject ¶
func (*SMObject) GetInitStateFor ¶
func (sm *SMObject) GetInitStateFor(smachine.StateMachine) smachine.InitFunc
func (*SMObject) GetStateMachineDeclaration ¶
func (sm *SMObject) GetStateMachineDeclaration() smachine.StateMachineDeclaration
func (*SMObject) Init ¶
func (sm *SMObject) Init(ctx smachine.InitializationContext) smachine.StateUpdate
func (*SMObject) InjectDependencies ¶
func (sm *SMObject) InjectDependencies(stateMachine smachine.StateMachine, _ smachine.SlotLink, injector injector.DependencyInjector)
type SharedState ¶
type SharedState struct {
}type SharedStateAccessor ¶
type SharedStateAccessor struct {
}func (SharedStateAccessor) Prepare ¶
func (v SharedStateAccessor) Prepare(fn func(*SharedState)) smachine.SharedDataAccessor
func (SharedStateAccessor) PrepareAndWakeUp ¶
func (v SharedStateAccessor) PrepareAndWakeUp(fn func(*SharedState)) smachine.SharedDataAccessor