Documentation ¶
Index ¶
- Variables
- func NewVMObjectSM(objKey longbits.ByteString) *vmObjectSM
- type ArtifactBinary
- type ArtifactCacheID
- type ArtifactCacheService
- type ArtifactCacheServiceAdapter
- type ArtifactClientService
- type ArtifactClientServiceAdapter
- type CallResult
- type CatalogC
- type ContractCallType
- type ContractRunnerService
- type ContractRunnerServiceAdapter
- type CustomSharedState
- type CustomSharedStateAccessor
- type LocalObjectCatalog
- func (p LocalObjectCatalog) Get(ctx smachine.ExecutionContext, key longbits.ByteString) SharedObjectStateAccessor
- func (p LocalObjectCatalog) GetOrCreate(ctx smachine.ExecutionContext, key longbits.ByteString) SharedObjectStateAccessor
- func (p LocalObjectCatalog) TryGet(ctx smachine.ExecutionContext, key longbits.ByteString) (SharedObjectStateAccessor, bool)
- type ObjectInfo
- type ServiceA
- type ServiceAdapterA
- type SharedObjectState
- type SharedObjectStateAccessor
- type StateMachine1
- func (s *StateMachine1) GetStateMachineDeclaration() smachine.StateMachineDeclaration
- func (s *StateMachine1) Init(ctx smachine.InitializationContext) smachine.StateUpdate
- func (s *StateMachine1) State1(ctx smachine.ExecutionContext) smachine.StateUpdate
- func (s *StateMachine1) State2(ctx smachine.ExecutionContext) smachine.StateUpdate
- func (s *StateMachine1) State2a(ctx smachine.ExecutionContext) smachine.StateUpdate
- func (s *StateMachine1) State3(ctx smachine.ExecutionContext) smachine.StateUpdate
- func (s *StateMachine1) State4(ctx smachine.ExecutionContext) smachine.StateUpdate
- func (s *StateMachine1) State5(ctx smachine.ExecutionContext) smachine.StateUpdate
- func (s *StateMachine1) State6(ctx smachine.ExecutionContext) smachine.StateUpdate
- type StateMachine2
- func (StateMachine2) GetInitStateFor(sm smachine.StateMachine) smachine.InitFunc
- func (s *StateMachine2) GetStateMachineDeclaration() smachine.StateMachineDeclaration
- func (s *StateMachine2) Init(ctx smachine.InitializationContext) smachine.StateUpdate
- func (s *StateMachine2) State0(ctx smachine.ExecutionContext) smachine.StateUpdate
- type StateMachine3
- func (StateMachine3) GetInitStateFor(sm smachine.StateMachine) smachine.InitFunc
- func (s *StateMachine3) GetStateMachineDeclaration() smachine.StateMachineDeclaration
- func (s *StateMachine3) GetSubroutineInitState(smachine.SubroutineStartContext) smachine.InitFunc
- func (s *StateMachine3) Init(ctx smachine.InitializationContext) smachine.StateUpdate
- func (s *StateMachine3) State0(ctx smachine.ExecutionContext) smachine.StateUpdate
- func (s *StateMachine3) State1(ctx smachine.ExecutionContext) smachine.StateUpdate
- type StateMachineCallRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var IterationCount uint64
View Source
var Limiter = smsync.NewFixedSemaphore(1000, "global")
Functions ¶
func NewVMObjectSM ¶
func NewVMObjectSM(objKey longbits.ByteString) *vmObjectSM
Types ¶
type ArtifactBinary ¶
type ArtifactBinary interface { GetReference() reference.Global GetCacheId() ArtifactCacheID }
type ArtifactCacheID ¶
type ArtifactCacheID string
type ArtifactCacheService ¶
type ArtifactCacheService interface { Set(objectID reference.Local, object []byte) ArtifactCacheID SetRandomID(object []byte) (ArtifactCacheID, error) Get(id ArtifactCacheID) ([]byte, bool) }
type ArtifactCacheServiceAdapter ¶
type ArtifactCacheServiceAdapter struct {
// contains filtered or unexported fields
}
func CreateArtifactCacheService ¶
func CreateArtifactCacheService() *ArtifactCacheServiceAdapter
func (*ArtifactCacheServiceAdapter) PrepareAsync ¶
func (a *ArtifactCacheServiceAdapter) PrepareAsync(ctx smachine.ExecutionContext, fn func(svc ArtifactCacheService) smachine.AsyncResultFunc) smachine.AsyncCallRequester
func (*ArtifactCacheServiceAdapter) PrepareSync ¶
func (a *ArtifactCacheServiceAdapter) PrepareSync(ctx smachine.ExecutionContext, fn func(svc ArtifactCacheService)) smachine.SyncCallRequester
type ArtifactClientService ¶
type ArtifactClientService interface {
GetLatestValidatedStateAndCode() (state, code ArtifactBinary)
}
type ArtifactClientServiceAdapter ¶
type ArtifactClientServiceAdapter struct {
// contains filtered or unexported fields
}
func CreateArtifactClientService ¶
func CreateArtifactClientService() *ArtifactClientServiceAdapter
func (*ArtifactClientServiceAdapter) PrepareAsync ¶
func (a *ArtifactClientServiceAdapter) PrepareAsync(ctx smachine.ExecutionContext, fn func(svc ArtifactClientService) smachine.AsyncResultFunc) smachine.AsyncCallRequester
func (*ArtifactClientServiceAdapter) PrepareSync ¶
func (a *ArtifactClientServiceAdapter) PrepareSync(ctx smachine.ExecutionContext, fn func(svc ArtifactClientService)) smachine.SyncCallRequester
type CallResult ¶
type CallResult interface { }
type ContractCallType ¶
type ContractCallType uint8
const ( ContractCallMutable ContractCallType ContractCallImmutable ContractCallSaga )
type ContractRunnerService ¶
type ContractRunnerService interface { ClassifyCall(code ArtifactBinary, method string) ContractCallType CallImmutableMethod(code ArtifactBinary, method string, state ArtifactBinary) CallResult }
type ContractRunnerServiceAdapter ¶
type ContractRunnerServiceAdapter struct {
// contains filtered or unexported fields
}
func (*ContractRunnerServiceAdapter) PrepareAsync ¶
func (a *ContractRunnerServiceAdapter) PrepareAsync(ctx smachine.ExecutionContext, fn func(svc ContractRunnerService) smachine.AsyncResultFunc) smachine.AsyncCallRequester
func (*ContractRunnerServiceAdapter) PrepareSync ¶
func (a *ContractRunnerServiceAdapter) PrepareSync(ctx smachine.ExecutionContext, fn func(svc ContractRunnerService)) smachine.SyncCallRequester
type CustomSharedState ¶
type CustomSharedState struct { // contains filtered or unexported fields }
func (*CustomSharedState) GetKey ¶
func (p *CustomSharedState) GetKey() longbits.ByteString
type CustomSharedStateAccessor ¶
type CustomSharedStateAccessor struct {
// contains filtered or unexported fields
}
func (CustomSharedStateAccessor) Prepare ¶
func (v CustomSharedStateAccessor) Prepare(fn func(*CustomSharedState)) smachine.SharedDataAccessor
type LocalObjectCatalog ¶
type LocalObjectCatalog struct { }
func (LocalObjectCatalog) Get ¶
func (p LocalObjectCatalog) Get(ctx smachine.ExecutionContext, key longbits.ByteString) SharedObjectStateAccessor
func (LocalObjectCatalog) GetOrCreate ¶
func (p LocalObjectCatalog) GetOrCreate(ctx smachine.ExecutionContext, key longbits.ByteString) SharedObjectStateAccessor
func (LocalObjectCatalog) TryGet ¶
func (p LocalObjectCatalog) TryGet(ctx smachine.ExecutionContext, key longbits.ByteString) (SharedObjectStateAccessor, bool)
type ObjectInfo ¶
type ObjectInfo struct { ObjKey longbits.ByteString IsReadyToWork bool ArtifactClient *ArtifactClientServiceAdapter ContractRunner *ContractRunnerServiceAdapter ObjectLatestValidState ArtifactBinary ObjectLatestValidCode ArtifactBinary ImmutableExecute smachine.SyncLink MutableExecute smachine.SyncLink }
type ServiceA ¶
type ServiceA interface { DoSomething(param string) string DoSomethingElse(param0 string, param1 int) (bool, string) }
Actual service
type ServiceAdapterA ¶
type ServiceAdapterA struct {
// contains filtered or unexported fields
}
generated or provided adapter
func CreateServiceAdapterA ¶
func CreateServiceAdapterA() *ServiceAdapterA
func (*ServiceAdapterA) PrepareAsync ¶
func (a *ServiceAdapterA) PrepareAsync(ctx smachine.ExecutionContext, fn func(svc ServiceA) smachine.AsyncResultFunc) smachine.AsyncCallRequester
func (*ServiceAdapterA) PrepareSync ¶
func (a *ServiceAdapterA) PrepareSync(ctx smachine.ExecutionContext, fn func(svc ServiceA)) smachine.SyncCallRequester
type SharedObjectState ¶
type SharedObjectState struct {}
type SharedObjectStateAccessor ¶
type SharedObjectStateAccessor struct {
}func (SharedObjectStateAccessor) Prepare ¶
func (v SharedObjectStateAccessor) Prepare(fn func(*SharedObjectState)) smachine.SharedDataAccessor
type StateMachine1 ¶
type StateMachine1 struct {
// contains filtered or unexported fields
}
func (*StateMachine1) GetStateMachineDeclaration ¶
func (s *StateMachine1) GetStateMachineDeclaration() smachine.StateMachineDeclaration
func (*StateMachine1) Init ¶
func (s *StateMachine1) Init(ctx smachine.InitializationContext) smachine.StateUpdate
func (*StateMachine1) State1 ¶
func (s *StateMachine1) State1(ctx smachine.ExecutionContext) smachine.StateUpdate
func (*StateMachine1) State2 ¶
func (s *StateMachine1) State2(ctx smachine.ExecutionContext) smachine.StateUpdate
func (*StateMachine1) State2a ¶
func (s *StateMachine1) State2a(ctx smachine.ExecutionContext) smachine.StateUpdate
func (*StateMachine1) State3 ¶
func (s *StateMachine1) State3(ctx smachine.ExecutionContext) smachine.StateUpdate
func (*StateMachine1) State4 ¶
func (s *StateMachine1) State4(ctx smachine.ExecutionContext) smachine.StateUpdate
func (*StateMachine1) State5 ¶
func (s *StateMachine1) State5(ctx smachine.ExecutionContext) smachine.StateUpdate
func (*StateMachine1) State6 ¶
func (s *StateMachine1) State6(ctx smachine.ExecutionContext) smachine.StateUpdate
type StateMachine2 ¶
type StateMachine2 struct { smachine.StateMachineDeclTemplate Yield bool // contains filtered or unexported fields }
func (StateMachine2) GetInitStateFor ¶
func (StateMachine2) GetInitStateFor(sm smachine.StateMachine) smachine.InitFunc
func (*StateMachine2) GetStateMachineDeclaration ¶
func (s *StateMachine2) GetStateMachineDeclaration() smachine.StateMachineDeclaration
func (*StateMachine2) Init ¶
func (s *StateMachine2) Init(ctx smachine.InitializationContext) smachine.StateUpdate
func (*StateMachine2) State0 ¶
func (s *StateMachine2) State0(ctx smachine.ExecutionContext) smachine.StateUpdate
type StateMachine3 ¶
type StateMachine3 struct { smachine.StateMachineDeclTemplate // contains filtered or unexported fields }
func (StateMachine3) GetInitStateFor ¶
func (StateMachine3) GetInitStateFor(sm smachine.StateMachine) smachine.InitFunc
func (*StateMachine3) GetStateMachineDeclaration ¶
func (s *StateMachine3) GetStateMachineDeclaration() smachine.StateMachineDeclaration
func (*StateMachine3) GetSubroutineInitState ¶
func (s *StateMachine3) GetSubroutineInitState(smachine.SubroutineStartContext) smachine.InitFunc
func (*StateMachine3) Init ¶
func (s *StateMachine3) Init(ctx smachine.InitializationContext) smachine.StateUpdate
func (*StateMachine3) State0 ¶
func (s *StateMachine3) State0(ctx smachine.ExecutionContext) smachine.StateUpdate
func (*StateMachine3) State1 ¶
func (s *StateMachine3) State1(ctx smachine.ExecutionContext) smachine.StateUpdate
type StateMachineCallRequest ¶
type StateMachineCallRequest struct {
// contains filtered or unexported fields
}
func (*StateMachineCallRequest) GetStateMachineDeclaration ¶
func (s *StateMachineCallRequest) GetStateMachineDeclaration() smachine.StateMachineDeclaration
func (*StateMachineCallRequest) Init ¶
func (s *StateMachineCallRequest) Init(ctx smachine.InitializationContext) smachine.StateUpdate
Click to show internal directories.
Click to hide internal directories.