Documentation ¶
Index ¶
- type Cache
- type CacheCallbackType
- type CacheMock
- func (mmByClassRef *CacheMock) ByClassRef(ctx context.Context, classRef reference.Global) (c2 Class, c3 Code, err error)
- func (mmByClassRef *CacheMock) ByClassRefAfterCounter() uint64
- func (mmByClassRef *CacheMock) ByClassRefBeforeCounter() uint64
- func (m *CacheMock) MinimockByClassRefDone() bool
- func (m *CacheMock) MinimockByClassRefInspect()
- func (m *CacheMock) MinimockFinish()
- func (m *CacheMock) MinimockRegisterCallbackDone() bool
- func (m *CacheMock) MinimockRegisterCallbackInspect()
- func (m *CacheMock) MinimockWait(timeout mm_time.Duration)
- func (mmRegisterCallback *CacheMock) RegisterCallback(cb CacheCallbackType)
- func (mmRegisterCallback *CacheMock) RegisterCallbackAfterCounter() uint64
- func (mmRegisterCallback *CacheMock) RegisterCallbackBeforeCounter() uint64
- type CacheMockByClassRefExpectation
- type CacheMockByClassRefParams
- type CacheMockByClassRefResults
- type CacheMockRegisterCallbackExpectation
- type CacheMockRegisterCallbackParams
- type Class
- type Code
- type Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { ByClassRef(ctx context.Context, classRef reference.Global) (Class, Code, error) RegisterCallback(cb CacheCallbackType) }
Cache provides convenient way to get class and code descriptors of objects without fetching them twice
type CacheCallbackType ¶
type CacheMock ¶
type CacheMock struct { ByClassRefMock mCacheMockByClassRef RegisterCallbackMock mCacheMockRegisterCallback // contains filtered or unexported fields }
CacheMock implements Cache
func NewCacheMock ¶
func NewCacheMock(t minimock.Tester) *CacheMock
NewCacheMock returns a mock for Cache
func (*CacheMock) ByClassRef ¶
func (mmByClassRef *CacheMock) ByClassRef(ctx context.Context, classRef reference.Global) (c2 Class, c3 Code, err error)
ByClassRef implements Cache
func (*CacheMock) ByClassRefAfterCounter ¶
ByClassRefAfterCounter returns a count of finished CacheMock.ByClassRef invocations
func (*CacheMock) ByClassRefBeforeCounter ¶
ByClassRefBeforeCounter returns a count of CacheMock.ByClassRef invocations
func (*CacheMock) MinimockByClassRefDone ¶
MinimockByClassRefDone returns true if the count of the ByClassRef invocations corresponds the number of defined expectations
func (*CacheMock) MinimockByClassRefInspect ¶
func (m *CacheMock) MinimockByClassRefInspect()
MinimockByClassRefInspect logs each unmet expectation
func (*CacheMock) MinimockFinish ¶
func (m *CacheMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*CacheMock) MinimockRegisterCallbackDone ¶
MinimockRegisterCallbackDone returns true if the count of the RegisterCallback invocations corresponds the number of defined expectations
func (*CacheMock) MinimockRegisterCallbackInspect ¶
func (m *CacheMock) MinimockRegisterCallbackInspect()
MinimockRegisterCallbackInspect logs each unmet expectation
func (*CacheMock) MinimockWait ¶
MinimockWait waits for all mocked methods to be called the expected number of times
func (*CacheMock) RegisterCallback ¶
func (mmRegisterCallback *CacheMock) RegisterCallback(cb CacheCallbackType)
RegisterCallback implements Cache
func (*CacheMock) RegisterCallbackAfterCounter ¶
RegisterCallbackAfterCounter returns a count of finished CacheMock.RegisterCallback invocations
func (*CacheMock) RegisterCallbackBeforeCounter ¶
RegisterCallbackBeforeCounter returns a count of CacheMock.RegisterCallback invocations
type CacheMockByClassRefExpectation ¶
type CacheMockByClassRefExpectation struct { Counter uint64 // contains filtered or unexported fields }
CacheMockByClassRefExpectation specifies expectation struct of the Cache.ByClassRef
type CacheMockByClassRefParams ¶
type CacheMockByClassRefParams struct {
// contains filtered or unexported fields
}
CacheMockByClassRefParams contains parameters of the Cache.ByClassRef
type CacheMockByClassRefResults ¶
type CacheMockByClassRefResults struct {
// contains filtered or unexported fields
}
CacheMockByClassRefResults contains results of the Cache.ByClassRef
type CacheMockRegisterCallbackExpectation ¶
type CacheMockRegisterCallbackExpectation struct { Counter uint64 // contains filtered or unexported fields }
CacheMockRegisterCallbackExpectation specifies expectation struct of the Cache.RegisterCallback
type CacheMockRegisterCallbackParams ¶
type CacheMockRegisterCallbackParams struct {
// contains filtered or unexported fields
}
CacheMockRegisterCallbackParams contains parameters of the Cache.RegisterCallback
type Class ¶
type Class interface { // HeadRef returns head reference to represented object record. HeadRef() reference.Global // StateID returns reference to object state record. StateID() reference.Local // Code returns code reference. Code() reference.Global }
Class represents meta info required to fetch all class data.
type Code ¶
type Code interface { // Ref returns reference to represented code record. Ref() reference.Global // Type returns code machine type for represented code. MachineType() machinetype.Type // Code returns code data. Code() ([]byte, error) }
Code represents meta info required to fetch all code data.
type Object ¶
type Object interface { // IsEmpty returns true if descriptor is empty IsEmpty() bool // HeadRef returns head reference to represented object record. HeadRef() reference.Global // State returns reference to object state record. State() reference.Global // Memory fetches object memory from storage. Memory() []byte // Class returns class reference. Class() reference.Global // Deactivated return true after SelfDestruct was called Deactivated() bool }
Object represents meta info about object's particular state.