logicrunner

package
v0.9.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package logicrunner - infrastructure for executing smartcontracts

Index

Constants

View Source
const InnerMsgTopic = "InnerMsg"

Variables

View Source
var ErrCantExecute = errors.New("can't executeAndReply this object")
View Source
var OutgoingRequestSenderDefaultGoroutineLimit = int32(5000)
View Source
var OutgoingRequestSenderDefaultQueueLimit = 1000

Functions

This section is empty.

Types

type AddFreshRequest

type AddFreshRequest struct {
	// contains filtered or unexported fields
}

func (*AddFreshRequest) Proceed

func (c *AddFreshRequest) Proceed(ctx context.Context) error

type AdditionalCallFromPreviousExecutor

type AdditionalCallFromPreviousExecutor struct {
	// contains filtered or unexported fields
}

func (*AdditionalCallFromPreviousExecutor) Proceed

type CheckOurRole

type CheckOurRole struct {
	// contains filtered or unexported fields
}

func (*CheckOurRole) Proceed

func (ch *CheckOurRole) Proceed(ctx context.Context) error

type Dependencies

type Dependencies struct {
	Publisher      message.Publisher
	StateStorage   StateStorage
	ResultsMatcher ResultMatcher

	Sender           bus.Sender
	JetStorage       jet.Storage
	WriteAccessor    writecontroller.Accessor
	OutgoingSender   OutgoingRequestSender
	RequestsExecutor RequestsExecutor
	// contains filtered or unexported fields
}

type ExecutionBroker

type ExecutionBroker struct {
	Ref insolar.Reference

	PendingConfirmed     bool
	HasPendingCheckMutex sync.Mutex
	// contains filtered or unexported fields
}

func NewExecutionBroker

func NewExecutionBroker(
	ref insolar.Reference,
	publisher watermillMsg.Publisher,
	requestsExecutor RequestsExecutor,
	sender bus.Sender,
	artifactsManager artifacts.Client,
	executionRegistry executionregistry.ExecutionRegistry,
	outgoingSender OutgoingRequestSender,
	pulseAccessor pulse.Accessor,
) *ExecutionBroker

func (*ExecutionBroker) AbandonedRequestsOnLedger

func (q *ExecutionBroker) AbandonedRequestsOnLedger(ctx context.Context)

func (*ExecutionBroker) AddAdditionalRequestFromPrevExecutor

func (q *ExecutionBroker) AddAdditionalRequestFromPrevExecutor(
	ctx context.Context, tr *common.Transcript,
)

func (*ExecutionBroker) AddFreshRequest

func (q *ExecutionBroker) AddFreshRequest(
	ctx context.Context, tr *common.Transcript,
)

func (*ExecutionBroker) AddRequestsFromLedger

func (q *ExecutionBroker) AddRequestsFromLedger(ctx context.Context, transcripts ...*common.Transcript)

func (*ExecutionBroker) AddRequestsFromPrevExecutor

func (q *ExecutionBroker) AddRequestsFromPrevExecutor(ctx context.Context, transcripts ...*common.Transcript)

func (*ExecutionBroker) Check

func (q *ExecutionBroker) Check(ctx context.Context) bool

func (*ExecutionBroker) FetchMoreRequestsFromLedger

func (q *ExecutionBroker) FetchMoreRequestsFromLedger(ctx context.Context)

func (*ExecutionBroker) GetActiveTranscript

func (q *ExecutionBroker) GetActiveTranscript(
	reqRef insolar.Reference,
) *common.Transcript

func (*ExecutionBroker) GetByReference

func (q *ExecutionBroker) GetByReference(_ context.Context, r *insolar.Reference) *common.Transcript

func (*ExecutionBroker) HasLedgerRequest

func (q *ExecutionBroker) HasLedgerRequest(_ context.Context) *common.Transcript

func (*ExecutionBroker) IsKnownRequest

func (q *ExecutionBroker) IsKnownRequest(ctx context.Context, req insolar.Reference) bool

func (*ExecutionBroker) MoreRequestsOnLedger

func (q *ExecutionBroker) MoreRequestsOnLedger(ctx context.Context)

func (*ExecutionBroker) NoMoreRequestsOnLedger

func (q *ExecutionBroker) NoMoreRequestsOnLedger(ctx context.Context)

func (*ExecutionBroker) OnPulse

func (q *ExecutionBroker) OnPulse(ctx context.Context) []payload.Payload

func (*ExecutionBroker) PendingState

func (q *ExecutionBroker) PendingState() insolar.PendingState

func (*ExecutionBroker) Prepend

func (q *ExecutionBroker) Prepend(ctx context.Context, start bool, transcripts ...*common.Transcript)

func (*ExecutionBroker) PrevExecutorPendingResult

func (q *ExecutionBroker) PrevExecutorPendingResult(ctx context.Context, prevExecState insolar.PendingState)

func (*ExecutionBroker) PrevExecutorSentPendingFinished

func (q *ExecutionBroker) PrevExecutorSentPendingFinished(ctx context.Context) error

func (*ExecutionBroker) PrevExecutorStillExecuting

func (q *ExecutionBroker) PrevExecutorStillExecuting(ctx context.Context)

func (*ExecutionBroker) Put

func (q *ExecutionBroker) Put(ctx context.Context, start bool, transcripts ...*common.Transcript)

One shouldn't mix immutable calls and mutable ones

func (*ExecutionBroker) SetNotPending

func (q *ExecutionBroker) SetNotPending(ctx context.Context)

func (*ExecutionBroker) StartProcessorIfNeeded

func (q *ExecutionBroker) StartProcessorIfNeeded(ctx context.Context, immutable bool)

StartProcessorIfNeeded processes queue messages in strict order (flag determines which one, mutable or immutable) We need to start manually execution broker only if we were in pending and now we're not.

func (*ExecutionBroker) StartProcessorsIfNeeded

func (q *ExecutionBroker) StartProcessorsIfNeeded(ctx context.Context)

type ExecutionBrokerI

type ExecutionBrokerI interface {
	AddFreshRequest(ctx context.Context, transcript *common.Transcript)
	AddRequestsFromPrevExecutor(ctx context.Context, transcripts ...*common.Transcript)
	AddRequestsFromLedger(ctx context.Context, transcripts ...*common.Transcript)
	AddAdditionalRequestFromPrevExecutor(ctx context.Context, transcript *common.Transcript)

	PendingState() insolar.PendingState
	PrevExecutorStillExecuting(ctx context.Context)
	PrevExecutorPendingResult(ctx context.Context, prevExecState insolar.PendingState)
	PrevExecutorSentPendingFinished(ctx context.Context) error
	SetNotPending(ctx context.Context)

	IsKnownRequest(ctx context.Context, req insolar.Reference) bool

	AbandonedRequestsOnLedger(ctx context.Context)
	MoreRequestsOnLedger(ctx context.Context)
	NoMoreRequestsOnLedger(ctx context.Context)
	FetchMoreRequestsFromLedger(ctx context.Context)

	OnPulse(ctx context.Context) []payload.Payload
}

type ExecutionBrokerIMock

type ExecutionBrokerIMock struct {
	AbandonedRequestsOnLedgerMock mExecutionBrokerIMockAbandonedRequestsOnLedger

	AddAdditionalRequestFromPrevExecutorMock mExecutionBrokerIMockAddAdditionalRequestFromPrevExecutor

	AddFreshRequestMock mExecutionBrokerIMockAddFreshRequest

	AddRequestsFromLedgerMock mExecutionBrokerIMockAddRequestsFromLedger

	AddRequestsFromPrevExecutorMock mExecutionBrokerIMockAddRequestsFromPrevExecutor

	FetchMoreRequestsFromLedgerMock mExecutionBrokerIMockFetchMoreRequestsFromLedger

	IsKnownRequestMock mExecutionBrokerIMockIsKnownRequest

	MoreRequestsOnLedgerMock mExecutionBrokerIMockMoreRequestsOnLedger

	NoMoreRequestsOnLedgerMock mExecutionBrokerIMockNoMoreRequestsOnLedger

	OnPulseMock mExecutionBrokerIMockOnPulse

	PendingStateMock mExecutionBrokerIMockPendingState

	PrevExecutorPendingResultMock mExecutionBrokerIMockPrevExecutorPendingResult

	PrevExecutorSentPendingFinishedMock mExecutionBrokerIMockPrevExecutorSentPendingFinished

	PrevExecutorStillExecutingMock mExecutionBrokerIMockPrevExecutorStillExecuting

	SetNotPendingMock mExecutionBrokerIMockSetNotPending
	// contains filtered or unexported fields
}

ExecutionBrokerIMock implements ExecutionBrokerI

func NewExecutionBrokerIMock

func NewExecutionBrokerIMock(t minimock.Tester) *ExecutionBrokerIMock

NewExecutionBrokerIMock returns a mock for ExecutionBrokerI

func (*ExecutionBrokerIMock) AbandonedRequestsOnLedger

func (mmAbandonedRequestsOnLedger *ExecutionBrokerIMock) AbandonedRequestsOnLedger(ctx context.Context)

AbandonedRequestsOnLedger implements ExecutionBrokerI

func (*ExecutionBrokerIMock) AbandonedRequestsOnLedgerAfterCounter

func (mmAbandonedRequestsOnLedger *ExecutionBrokerIMock) AbandonedRequestsOnLedgerAfterCounter() uint64

AbandonedRequestsOnLedgerAfterCounter returns a count of finished ExecutionBrokerIMock.AbandonedRequestsOnLedger invocations

func (*ExecutionBrokerIMock) AbandonedRequestsOnLedgerBeforeCounter

func (mmAbandonedRequestsOnLedger *ExecutionBrokerIMock) AbandonedRequestsOnLedgerBeforeCounter() uint64

AbandonedRequestsOnLedgerBeforeCounter returns a count of ExecutionBrokerIMock.AbandonedRequestsOnLedger invocations

func (*ExecutionBrokerIMock) AddAdditionalRequestFromPrevExecutor

func (mmAddAdditionalRequestFromPrevExecutor *ExecutionBrokerIMock) AddAdditionalRequestFromPrevExecutor(ctx context.Context, transcript *common.Transcript)

AddAdditionalRequestFromPrevExecutor implements ExecutionBrokerI

func (*ExecutionBrokerIMock) AddAdditionalRequestFromPrevExecutorAfterCounter

func (mmAddAdditionalRequestFromPrevExecutor *ExecutionBrokerIMock) AddAdditionalRequestFromPrevExecutorAfterCounter() uint64

AddAdditionalRequestFromPrevExecutorAfterCounter returns a count of finished ExecutionBrokerIMock.AddAdditionalRequestFromPrevExecutor invocations

func (*ExecutionBrokerIMock) AddAdditionalRequestFromPrevExecutorBeforeCounter

func (mmAddAdditionalRequestFromPrevExecutor *ExecutionBrokerIMock) AddAdditionalRequestFromPrevExecutorBeforeCounter() uint64

AddAdditionalRequestFromPrevExecutorBeforeCounter returns a count of ExecutionBrokerIMock.AddAdditionalRequestFromPrevExecutor invocations

func (*ExecutionBrokerIMock) AddFreshRequest

func (mmAddFreshRequest *ExecutionBrokerIMock) AddFreshRequest(ctx context.Context, transcript *common.Transcript)

AddFreshRequest implements ExecutionBrokerI

func (*ExecutionBrokerIMock) AddFreshRequestAfterCounter

func (mmAddFreshRequest *ExecutionBrokerIMock) AddFreshRequestAfterCounter() uint64

AddFreshRequestAfterCounter returns a count of finished ExecutionBrokerIMock.AddFreshRequest invocations

func (*ExecutionBrokerIMock) AddFreshRequestBeforeCounter

func (mmAddFreshRequest *ExecutionBrokerIMock) AddFreshRequestBeforeCounter() uint64

AddFreshRequestBeforeCounter returns a count of ExecutionBrokerIMock.AddFreshRequest invocations

func (*ExecutionBrokerIMock) AddRequestsFromLedger

func (mmAddRequestsFromLedger *ExecutionBrokerIMock) AddRequestsFromLedger(ctx context.Context, transcripts ...*common.Transcript)

AddRequestsFromLedger implements ExecutionBrokerI

func (*ExecutionBrokerIMock) AddRequestsFromLedgerAfterCounter

func (mmAddRequestsFromLedger *ExecutionBrokerIMock) AddRequestsFromLedgerAfterCounter() uint64

AddRequestsFromLedgerAfterCounter returns a count of finished ExecutionBrokerIMock.AddRequestsFromLedger invocations

func (*ExecutionBrokerIMock) AddRequestsFromLedgerBeforeCounter

func (mmAddRequestsFromLedger *ExecutionBrokerIMock) AddRequestsFromLedgerBeforeCounter() uint64

AddRequestsFromLedgerBeforeCounter returns a count of ExecutionBrokerIMock.AddRequestsFromLedger invocations

func (*ExecutionBrokerIMock) AddRequestsFromPrevExecutor

func (mmAddRequestsFromPrevExecutor *ExecutionBrokerIMock) AddRequestsFromPrevExecutor(ctx context.Context, transcripts ...*common.Transcript)

AddRequestsFromPrevExecutor implements ExecutionBrokerI

func (*ExecutionBrokerIMock) AddRequestsFromPrevExecutorAfterCounter

func (mmAddRequestsFromPrevExecutor *ExecutionBrokerIMock) AddRequestsFromPrevExecutorAfterCounter() uint64

AddRequestsFromPrevExecutorAfterCounter returns a count of finished ExecutionBrokerIMock.AddRequestsFromPrevExecutor invocations

func (*ExecutionBrokerIMock) AddRequestsFromPrevExecutorBeforeCounter

func (mmAddRequestsFromPrevExecutor *ExecutionBrokerIMock) AddRequestsFromPrevExecutorBeforeCounter() uint64

AddRequestsFromPrevExecutorBeforeCounter returns a count of ExecutionBrokerIMock.AddRequestsFromPrevExecutor invocations

func (*ExecutionBrokerIMock) FetchMoreRequestsFromLedger

func (mmFetchMoreRequestsFromLedger *ExecutionBrokerIMock) FetchMoreRequestsFromLedger(ctx context.Context)

FetchMoreRequestsFromLedger implements ExecutionBrokerI

func (*ExecutionBrokerIMock) FetchMoreRequestsFromLedgerAfterCounter

func (mmFetchMoreRequestsFromLedger *ExecutionBrokerIMock) FetchMoreRequestsFromLedgerAfterCounter() uint64

FetchMoreRequestsFromLedgerAfterCounter returns a count of finished ExecutionBrokerIMock.FetchMoreRequestsFromLedger invocations

func (*ExecutionBrokerIMock) FetchMoreRequestsFromLedgerBeforeCounter

func (mmFetchMoreRequestsFromLedger *ExecutionBrokerIMock) FetchMoreRequestsFromLedgerBeforeCounter() uint64

FetchMoreRequestsFromLedgerBeforeCounter returns a count of ExecutionBrokerIMock.FetchMoreRequestsFromLedger invocations

func (*ExecutionBrokerIMock) IsKnownRequest

func (mmIsKnownRequest *ExecutionBrokerIMock) IsKnownRequest(ctx context.Context, req insolar.Reference) (b1 bool)

IsKnownRequest implements ExecutionBrokerI

func (*ExecutionBrokerIMock) IsKnownRequestAfterCounter

func (mmIsKnownRequest *ExecutionBrokerIMock) IsKnownRequestAfterCounter() uint64

IsKnownRequestAfterCounter returns a count of finished ExecutionBrokerIMock.IsKnownRequest invocations

func (*ExecutionBrokerIMock) IsKnownRequestBeforeCounter

func (mmIsKnownRequest *ExecutionBrokerIMock) IsKnownRequestBeforeCounter() uint64

IsKnownRequestBeforeCounter returns a count of ExecutionBrokerIMock.IsKnownRequest invocations

func (*ExecutionBrokerIMock) MinimockAbandonedRequestsOnLedgerDone

func (m *ExecutionBrokerIMock) MinimockAbandonedRequestsOnLedgerDone() bool

MinimockAbandonedRequestsOnLedgerDone returns true if the count of the AbandonedRequestsOnLedger invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockAbandonedRequestsOnLedgerInspect

func (m *ExecutionBrokerIMock) MinimockAbandonedRequestsOnLedgerInspect()

MinimockAbandonedRequestsOnLedgerInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockAddAdditionalRequestFromPrevExecutorDone

func (m *ExecutionBrokerIMock) MinimockAddAdditionalRequestFromPrevExecutorDone() bool

MinimockAddAdditionalRequestFromPrevExecutorDone returns true if the count of the AddAdditionalRequestFromPrevExecutor invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockAddAdditionalRequestFromPrevExecutorInspect

func (m *ExecutionBrokerIMock) MinimockAddAdditionalRequestFromPrevExecutorInspect()

MinimockAddAdditionalRequestFromPrevExecutorInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockAddFreshRequestDone

func (m *ExecutionBrokerIMock) MinimockAddFreshRequestDone() bool

MinimockAddFreshRequestDone returns true if the count of the AddFreshRequest invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockAddFreshRequestInspect

func (m *ExecutionBrokerIMock) MinimockAddFreshRequestInspect()

MinimockAddFreshRequestInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockAddRequestsFromLedgerDone

func (m *ExecutionBrokerIMock) MinimockAddRequestsFromLedgerDone() bool

MinimockAddRequestsFromLedgerDone returns true if the count of the AddRequestsFromLedger invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockAddRequestsFromLedgerInspect

func (m *ExecutionBrokerIMock) MinimockAddRequestsFromLedgerInspect()

MinimockAddRequestsFromLedgerInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockAddRequestsFromPrevExecutorDone

func (m *ExecutionBrokerIMock) MinimockAddRequestsFromPrevExecutorDone() bool

MinimockAddRequestsFromPrevExecutorDone returns true if the count of the AddRequestsFromPrevExecutor invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockAddRequestsFromPrevExecutorInspect

func (m *ExecutionBrokerIMock) MinimockAddRequestsFromPrevExecutorInspect()

MinimockAddRequestsFromPrevExecutorInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockFetchMoreRequestsFromLedgerDone

func (m *ExecutionBrokerIMock) MinimockFetchMoreRequestsFromLedgerDone() bool

MinimockFetchMoreRequestsFromLedgerDone returns true if the count of the FetchMoreRequestsFromLedger invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockFetchMoreRequestsFromLedgerInspect

func (m *ExecutionBrokerIMock) MinimockFetchMoreRequestsFromLedgerInspect()

MinimockFetchMoreRequestsFromLedgerInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockFinish

func (m *ExecutionBrokerIMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ExecutionBrokerIMock) MinimockIsKnownRequestDone

func (m *ExecutionBrokerIMock) MinimockIsKnownRequestDone() bool

MinimockIsKnownRequestDone returns true if the count of the IsKnownRequest invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockIsKnownRequestInspect

func (m *ExecutionBrokerIMock) MinimockIsKnownRequestInspect()

MinimockIsKnownRequestInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockMoreRequestsOnLedgerDone

func (m *ExecutionBrokerIMock) MinimockMoreRequestsOnLedgerDone() bool

MinimockMoreRequestsOnLedgerDone returns true if the count of the MoreRequestsOnLedger invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockMoreRequestsOnLedgerInspect

func (m *ExecutionBrokerIMock) MinimockMoreRequestsOnLedgerInspect()

MinimockMoreRequestsOnLedgerInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockNoMoreRequestsOnLedgerDone

func (m *ExecutionBrokerIMock) MinimockNoMoreRequestsOnLedgerDone() bool

MinimockNoMoreRequestsOnLedgerDone returns true if the count of the NoMoreRequestsOnLedger invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockNoMoreRequestsOnLedgerInspect

func (m *ExecutionBrokerIMock) MinimockNoMoreRequestsOnLedgerInspect()

MinimockNoMoreRequestsOnLedgerInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockOnPulseDone

func (m *ExecutionBrokerIMock) MinimockOnPulseDone() bool

MinimockOnPulseDone returns true if the count of the OnPulse invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockOnPulseInspect

func (m *ExecutionBrokerIMock) MinimockOnPulseInspect()

MinimockOnPulseInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockPendingStateDone

func (m *ExecutionBrokerIMock) MinimockPendingStateDone() bool

MinimockPendingStateDone returns true if the count of the PendingState invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockPendingStateInspect

func (m *ExecutionBrokerIMock) MinimockPendingStateInspect()

MinimockPendingStateInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockPrevExecutorPendingResultDone

func (m *ExecutionBrokerIMock) MinimockPrevExecutorPendingResultDone() bool

MinimockPrevExecutorPendingResultDone returns true if the count of the PrevExecutorPendingResult invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockPrevExecutorPendingResultInspect

func (m *ExecutionBrokerIMock) MinimockPrevExecutorPendingResultInspect()

MinimockPrevExecutorPendingResultInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockPrevExecutorSentPendingFinishedDone

func (m *ExecutionBrokerIMock) MinimockPrevExecutorSentPendingFinishedDone() bool

MinimockPrevExecutorSentPendingFinishedDone returns true if the count of the PrevExecutorSentPendingFinished invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockPrevExecutorSentPendingFinishedInspect

func (m *ExecutionBrokerIMock) MinimockPrevExecutorSentPendingFinishedInspect()

MinimockPrevExecutorSentPendingFinishedInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockPrevExecutorStillExecutingDone

func (m *ExecutionBrokerIMock) MinimockPrevExecutorStillExecutingDone() bool

MinimockPrevExecutorStillExecutingDone returns true if the count of the PrevExecutorStillExecuting invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockPrevExecutorStillExecutingInspect

func (m *ExecutionBrokerIMock) MinimockPrevExecutorStillExecutingInspect()

MinimockPrevExecutorStillExecutingInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockSetNotPendingDone

func (m *ExecutionBrokerIMock) MinimockSetNotPendingDone() bool

MinimockSetNotPendingDone returns true if the count of the SetNotPending invocations corresponds the number of defined expectations

func (*ExecutionBrokerIMock) MinimockSetNotPendingInspect

func (m *ExecutionBrokerIMock) MinimockSetNotPendingInspect()

MinimockSetNotPendingInspect logs each unmet expectation

func (*ExecutionBrokerIMock) MinimockWait

func (m *ExecutionBrokerIMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*ExecutionBrokerIMock) MoreRequestsOnLedger

func (mmMoreRequestsOnLedger *ExecutionBrokerIMock) MoreRequestsOnLedger(ctx context.Context)

MoreRequestsOnLedger implements ExecutionBrokerI

func (*ExecutionBrokerIMock) MoreRequestsOnLedgerAfterCounter

func (mmMoreRequestsOnLedger *ExecutionBrokerIMock) MoreRequestsOnLedgerAfterCounter() uint64

MoreRequestsOnLedgerAfterCounter returns a count of finished ExecutionBrokerIMock.MoreRequestsOnLedger invocations

func (*ExecutionBrokerIMock) MoreRequestsOnLedgerBeforeCounter

func (mmMoreRequestsOnLedger *ExecutionBrokerIMock) MoreRequestsOnLedgerBeforeCounter() uint64

MoreRequestsOnLedgerBeforeCounter returns a count of ExecutionBrokerIMock.MoreRequestsOnLedger invocations

func (*ExecutionBrokerIMock) NoMoreRequestsOnLedger

func (mmNoMoreRequestsOnLedger *ExecutionBrokerIMock) NoMoreRequestsOnLedger(ctx context.Context)

NoMoreRequestsOnLedger implements ExecutionBrokerI

func (*ExecutionBrokerIMock) NoMoreRequestsOnLedgerAfterCounter

func (mmNoMoreRequestsOnLedger *ExecutionBrokerIMock) NoMoreRequestsOnLedgerAfterCounter() uint64

NoMoreRequestsOnLedgerAfterCounter returns a count of finished ExecutionBrokerIMock.NoMoreRequestsOnLedger invocations

func (*ExecutionBrokerIMock) NoMoreRequestsOnLedgerBeforeCounter

func (mmNoMoreRequestsOnLedger *ExecutionBrokerIMock) NoMoreRequestsOnLedgerBeforeCounter() uint64

NoMoreRequestsOnLedgerBeforeCounter returns a count of ExecutionBrokerIMock.NoMoreRequestsOnLedger invocations

func (*ExecutionBrokerIMock) OnPulse

func (mmOnPulse *ExecutionBrokerIMock) OnPulse(ctx context.Context) (pa1 []payload.Payload)

OnPulse implements ExecutionBrokerI

func (*ExecutionBrokerIMock) OnPulseAfterCounter

func (mmOnPulse *ExecutionBrokerIMock) OnPulseAfterCounter() uint64

OnPulseAfterCounter returns a count of finished ExecutionBrokerIMock.OnPulse invocations

func (*ExecutionBrokerIMock) OnPulseBeforeCounter

func (mmOnPulse *ExecutionBrokerIMock) OnPulseBeforeCounter() uint64

OnPulseBeforeCounter returns a count of ExecutionBrokerIMock.OnPulse invocations

func (*ExecutionBrokerIMock) PendingState

func (mmPendingState *ExecutionBrokerIMock) PendingState() (p1 insolar.PendingState)

PendingState implements ExecutionBrokerI

func (*ExecutionBrokerIMock) PendingStateAfterCounter

func (mmPendingState *ExecutionBrokerIMock) PendingStateAfterCounter() uint64

PendingStateAfterCounter returns a count of finished ExecutionBrokerIMock.PendingState invocations

func (*ExecutionBrokerIMock) PendingStateBeforeCounter

func (mmPendingState *ExecutionBrokerIMock) PendingStateBeforeCounter() uint64

PendingStateBeforeCounter returns a count of ExecutionBrokerIMock.PendingState invocations

func (*ExecutionBrokerIMock) PrevExecutorPendingResult

func (mmPrevExecutorPendingResult *ExecutionBrokerIMock) PrevExecutorPendingResult(ctx context.Context, prevExecState insolar.PendingState)

PrevExecutorPendingResult implements ExecutionBrokerI

func (*ExecutionBrokerIMock) PrevExecutorPendingResultAfterCounter

func (mmPrevExecutorPendingResult *ExecutionBrokerIMock) PrevExecutorPendingResultAfterCounter() uint64

PrevExecutorPendingResultAfterCounter returns a count of finished ExecutionBrokerIMock.PrevExecutorPendingResult invocations

func (*ExecutionBrokerIMock) PrevExecutorPendingResultBeforeCounter

func (mmPrevExecutorPendingResult *ExecutionBrokerIMock) PrevExecutorPendingResultBeforeCounter() uint64

PrevExecutorPendingResultBeforeCounter returns a count of ExecutionBrokerIMock.PrevExecutorPendingResult invocations

func (*ExecutionBrokerIMock) PrevExecutorSentPendingFinished

func (mmPrevExecutorSentPendingFinished *ExecutionBrokerIMock) PrevExecutorSentPendingFinished(ctx context.Context) (err error)

PrevExecutorSentPendingFinished implements ExecutionBrokerI

func (*ExecutionBrokerIMock) PrevExecutorSentPendingFinishedAfterCounter

func (mmPrevExecutorSentPendingFinished *ExecutionBrokerIMock) PrevExecutorSentPendingFinishedAfterCounter() uint64

PrevExecutorSentPendingFinishedAfterCounter returns a count of finished ExecutionBrokerIMock.PrevExecutorSentPendingFinished invocations

func (*ExecutionBrokerIMock) PrevExecutorSentPendingFinishedBeforeCounter

func (mmPrevExecutorSentPendingFinished *ExecutionBrokerIMock) PrevExecutorSentPendingFinishedBeforeCounter() uint64

PrevExecutorSentPendingFinishedBeforeCounter returns a count of ExecutionBrokerIMock.PrevExecutorSentPendingFinished invocations

func (*ExecutionBrokerIMock) PrevExecutorStillExecuting

func (mmPrevExecutorStillExecuting *ExecutionBrokerIMock) PrevExecutorStillExecuting(ctx context.Context)

PrevExecutorStillExecuting implements ExecutionBrokerI

func (*ExecutionBrokerIMock) PrevExecutorStillExecutingAfterCounter

func (mmPrevExecutorStillExecuting *ExecutionBrokerIMock) PrevExecutorStillExecutingAfterCounter() uint64

PrevExecutorStillExecutingAfterCounter returns a count of finished ExecutionBrokerIMock.PrevExecutorStillExecuting invocations

func (*ExecutionBrokerIMock) PrevExecutorStillExecutingBeforeCounter

func (mmPrevExecutorStillExecuting *ExecutionBrokerIMock) PrevExecutorStillExecutingBeforeCounter() uint64

PrevExecutorStillExecutingBeforeCounter returns a count of ExecutionBrokerIMock.PrevExecutorStillExecuting invocations

func (*ExecutionBrokerIMock) SetNotPending

func (mmSetNotPending *ExecutionBrokerIMock) SetNotPending(ctx context.Context)

SetNotPending implements ExecutionBrokerI

func (*ExecutionBrokerIMock) SetNotPendingAfterCounter

func (mmSetNotPending *ExecutionBrokerIMock) SetNotPendingAfterCounter() uint64

SetNotPendingAfterCounter returns a count of finished ExecutionBrokerIMock.SetNotPending invocations

func (*ExecutionBrokerIMock) SetNotPendingBeforeCounter

func (mmSetNotPending *ExecutionBrokerIMock) SetNotPendingBeforeCounter() uint64

SetNotPendingBeforeCounter returns a count of ExecutionBrokerIMock.SetNotPending invocations

type ExecutionBrokerIMockAbandonedRequestsOnLedgerExpectation

type ExecutionBrokerIMockAbandonedRequestsOnLedgerExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAbandonedRequestsOnLedgerExpectation specifies expectation struct of the ExecutionBrokerI.AbandonedRequestsOnLedger

type ExecutionBrokerIMockAbandonedRequestsOnLedgerParams

type ExecutionBrokerIMockAbandonedRequestsOnLedgerParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAbandonedRequestsOnLedgerParams contains parameters of the ExecutionBrokerI.AbandonedRequestsOnLedger

type ExecutionBrokerIMockAddAdditionalRequestFromPrevExecutorExpectation

type ExecutionBrokerIMockAddAdditionalRequestFromPrevExecutorExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddAdditionalRequestFromPrevExecutorExpectation specifies expectation struct of the ExecutionBrokerI.AddAdditionalRequestFromPrevExecutor

type ExecutionBrokerIMockAddAdditionalRequestFromPrevExecutorParams

type ExecutionBrokerIMockAddAdditionalRequestFromPrevExecutorParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddAdditionalRequestFromPrevExecutorParams contains parameters of the ExecutionBrokerI.AddAdditionalRequestFromPrevExecutor

type ExecutionBrokerIMockAddFreshRequestExpectation

type ExecutionBrokerIMockAddFreshRequestExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddFreshRequestExpectation specifies expectation struct of the ExecutionBrokerI.AddFreshRequest

type ExecutionBrokerIMockAddFreshRequestParams

type ExecutionBrokerIMockAddFreshRequestParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddFreshRequestParams contains parameters of the ExecutionBrokerI.AddFreshRequest

type ExecutionBrokerIMockAddRequestsFromLedgerExpectation

type ExecutionBrokerIMockAddRequestsFromLedgerExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddRequestsFromLedgerExpectation specifies expectation struct of the ExecutionBrokerI.AddRequestsFromLedger

type ExecutionBrokerIMockAddRequestsFromLedgerParams

type ExecutionBrokerIMockAddRequestsFromLedgerParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddRequestsFromLedgerParams contains parameters of the ExecutionBrokerI.AddRequestsFromLedger

type ExecutionBrokerIMockAddRequestsFromPrevExecutorExpectation

type ExecutionBrokerIMockAddRequestsFromPrevExecutorExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddRequestsFromPrevExecutorExpectation specifies expectation struct of the ExecutionBrokerI.AddRequestsFromPrevExecutor

type ExecutionBrokerIMockAddRequestsFromPrevExecutorParams

type ExecutionBrokerIMockAddRequestsFromPrevExecutorParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockAddRequestsFromPrevExecutorParams contains parameters of the ExecutionBrokerI.AddRequestsFromPrevExecutor

type ExecutionBrokerIMockFetchMoreRequestsFromLedgerExpectation

type ExecutionBrokerIMockFetchMoreRequestsFromLedgerExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockFetchMoreRequestsFromLedgerExpectation specifies expectation struct of the ExecutionBrokerI.FetchMoreRequestsFromLedger

type ExecutionBrokerIMockFetchMoreRequestsFromLedgerParams

type ExecutionBrokerIMockFetchMoreRequestsFromLedgerParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockFetchMoreRequestsFromLedgerParams contains parameters of the ExecutionBrokerI.FetchMoreRequestsFromLedger

type ExecutionBrokerIMockIsKnownRequestExpectation

type ExecutionBrokerIMockIsKnownRequestExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockIsKnownRequestExpectation specifies expectation struct of the ExecutionBrokerI.IsKnownRequest

func (*ExecutionBrokerIMockIsKnownRequestExpectation) Then

Then sets up ExecutionBrokerI.IsKnownRequest return parameters for the expectation previously defined by the When method

type ExecutionBrokerIMockIsKnownRequestParams

type ExecutionBrokerIMockIsKnownRequestParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockIsKnownRequestParams contains parameters of the ExecutionBrokerI.IsKnownRequest

type ExecutionBrokerIMockIsKnownRequestResults

type ExecutionBrokerIMockIsKnownRequestResults struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockIsKnownRequestResults contains results of the ExecutionBrokerI.IsKnownRequest

type ExecutionBrokerIMockMoreRequestsOnLedgerExpectation

type ExecutionBrokerIMockMoreRequestsOnLedgerExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockMoreRequestsOnLedgerExpectation specifies expectation struct of the ExecutionBrokerI.MoreRequestsOnLedger

type ExecutionBrokerIMockMoreRequestsOnLedgerParams

type ExecutionBrokerIMockMoreRequestsOnLedgerParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockMoreRequestsOnLedgerParams contains parameters of the ExecutionBrokerI.MoreRequestsOnLedger

type ExecutionBrokerIMockNoMoreRequestsOnLedgerExpectation

type ExecutionBrokerIMockNoMoreRequestsOnLedgerExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockNoMoreRequestsOnLedgerExpectation specifies expectation struct of the ExecutionBrokerI.NoMoreRequestsOnLedger

type ExecutionBrokerIMockNoMoreRequestsOnLedgerParams

type ExecutionBrokerIMockNoMoreRequestsOnLedgerParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockNoMoreRequestsOnLedgerParams contains parameters of the ExecutionBrokerI.NoMoreRequestsOnLedger

type ExecutionBrokerIMockOnPulseExpectation

type ExecutionBrokerIMockOnPulseExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockOnPulseExpectation specifies expectation struct of the ExecutionBrokerI.OnPulse

func (*ExecutionBrokerIMockOnPulseExpectation) Then

Then sets up ExecutionBrokerI.OnPulse return parameters for the expectation previously defined by the When method

type ExecutionBrokerIMockOnPulseParams

type ExecutionBrokerIMockOnPulseParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockOnPulseParams contains parameters of the ExecutionBrokerI.OnPulse

type ExecutionBrokerIMockOnPulseResults

type ExecutionBrokerIMockOnPulseResults struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockOnPulseResults contains results of the ExecutionBrokerI.OnPulse

type ExecutionBrokerIMockPendingStateExpectation

type ExecutionBrokerIMockPendingStateExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPendingStateExpectation specifies expectation struct of the ExecutionBrokerI.PendingState

type ExecutionBrokerIMockPendingStateResults

type ExecutionBrokerIMockPendingStateResults struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPendingStateResults contains results of the ExecutionBrokerI.PendingState

type ExecutionBrokerIMockPrevExecutorPendingResultExpectation

type ExecutionBrokerIMockPrevExecutorPendingResultExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPrevExecutorPendingResultExpectation specifies expectation struct of the ExecutionBrokerI.PrevExecutorPendingResult

type ExecutionBrokerIMockPrevExecutorPendingResultParams

type ExecutionBrokerIMockPrevExecutorPendingResultParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPrevExecutorPendingResultParams contains parameters of the ExecutionBrokerI.PrevExecutorPendingResult

type ExecutionBrokerIMockPrevExecutorSentPendingFinishedExpectation

type ExecutionBrokerIMockPrevExecutorSentPendingFinishedExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPrevExecutorSentPendingFinishedExpectation specifies expectation struct of the ExecutionBrokerI.PrevExecutorSentPendingFinished

func (*ExecutionBrokerIMockPrevExecutorSentPendingFinishedExpectation) Then

Then sets up ExecutionBrokerI.PrevExecutorSentPendingFinished return parameters for the expectation previously defined by the When method

type ExecutionBrokerIMockPrevExecutorSentPendingFinishedParams

type ExecutionBrokerIMockPrevExecutorSentPendingFinishedParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPrevExecutorSentPendingFinishedParams contains parameters of the ExecutionBrokerI.PrevExecutorSentPendingFinished

type ExecutionBrokerIMockPrevExecutorSentPendingFinishedResults

type ExecutionBrokerIMockPrevExecutorSentPendingFinishedResults struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPrevExecutorSentPendingFinishedResults contains results of the ExecutionBrokerI.PrevExecutorSentPendingFinished

type ExecutionBrokerIMockPrevExecutorStillExecutingExpectation

type ExecutionBrokerIMockPrevExecutorStillExecutingExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPrevExecutorStillExecutingExpectation specifies expectation struct of the ExecutionBrokerI.PrevExecutorStillExecuting

type ExecutionBrokerIMockPrevExecutorStillExecutingParams

type ExecutionBrokerIMockPrevExecutorStillExecutingParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockPrevExecutorStillExecutingParams contains parameters of the ExecutionBrokerI.PrevExecutorStillExecuting

type ExecutionBrokerIMockSetNotPendingExpectation

type ExecutionBrokerIMockSetNotPendingExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ExecutionBrokerIMockSetNotPendingExpectation specifies expectation struct of the ExecutionBrokerI.SetNotPending

type ExecutionBrokerIMockSetNotPendingParams

type ExecutionBrokerIMockSetNotPendingParams struct {
	// contains filtered or unexported fields
}

ExecutionBrokerIMockSetNotPendingParams contains parameters of the ExecutionBrokerI.SetNotPending

type ExecutionBrokerRotationResult

type ExecutionBrokerRotationResult struct {
	Requests              []*common.Transcript
	Finished              []*common.Transcript
	LedgerHasMoreRequests bool
}

type HandleAbandonedRequestsNotification

type HandleAbandonedRequestsNotification struct {
	// contains filtered or unexported fields
}

func (*HandleAbandonedRequestsNotification) Present

type HandleAdditionalCallFromPreviousExecutor

type HandleAdditionalCallFromPreviousExecutor struct {
	Message payload.Meta
	Parcel  insolar.Parcel
	// contains filtered or unexported fields
}

func (*HandleAdditionalCallFromPreviousExecutor) Present

Please note that currently we lack any fraud detection here. Ideally we should check that the previous executor was really an executor during previous pulse, that the request was really registered, etc. Also we don't handle case when pulse changes during execution of this handle. In this scenario user is in a bad luck. The request will be lost and user will have to re-send it after some timeout.

type HandleCall

type HandleCall struct {
	Message payload.Meta
	Parcel  insolar.Parcel
	// contains filtered or unexported fields
}

func (*HandleCall) Present

func (h *HandleCall) Present(ctx context.Context, f flow.Flow) error

type HandleExecutorResults

type HandleExecutorResults struct {
	Message payload.Meta
	// contains filtered or unexported fields
}

func (*HandleExecutorResults) Present

func (h *HandleExecutorResults) Present(ctx context.Context, f flow.Flow) error

type HandlePendingFinished

type HandlePendingFinished struct {
	Message payload.Meta
	// contains filtered or unexported fields
}

func (*HandlePendingFinished) Present

func (h *HandlePendingFinished) Present(ctx context.Context, _ flow.Flow) error

type HandleSagaCallAcceptNotification

type HandleSagaCallAcceptNotification struct {
	// contains filtered or unexported fields
}

func (*HandleSagaCallAcceptNotification) Present

type HandleStillExecuting

type HandleStillExecuting struct {
	Message payload.Meta
	Parcel  insolar.Parcel
	// contains filtered or unexported fields
}

func (*HandleStillExecuting) Present

func (h *HandleStillExecuting) Present(ctx context.Context, f flow.Flow) error

type HandleUpdateJet

type HandleUpdateJet struct {
	// contains filtered or unexported fields
}

func (*HandleUpdateJet) Present

func (h *HandleUpdateJet) Present(ctx context.Context, _ flow.Flow) error

type Init

type Init struct {
	Message *message.Message
	// contains filtered or unexported fields
}

func (*Init) Future

func (s *Init) Future(ctx context.Context, f flow.Flow) error

func (*Init) Past

func (s *Init) Past(ctx context.Context, f flow.Flow) error

func (*Init) Present

func (s *Init) Present(ctx context.Context, f flow.Flow) error

type LogicRunner

type LogicRunner struct {
	MessageBus                 insolar.MessageBus                 `inject:""`
	ContractRequester          insolar.ContractRequester          `inject:""`
	NodeNetwork                network.NodeNetwork                `inject:""`
	PlatformCryptographyScheme insolar.PlatformCryptographyScheme `inject:""`
	ParcelFactory              message.ParcelFactory              `inject:""`
	PulseAccessor              pulse.Accessor                     `inject:""`
	ArtifactManager            artifacts.Client                   `inject:""`
	DescriptorsCache           artifacts.DescriptorsCache         `inject:""`
	JetCoordinator             jet.Coordinator                    `inject:""`
	RequestsExecutor           RequestsExecutor                   `inject:""`
	MachinesManager            machinesmanager.MachinesManager    `inject:""`
	JetStorage                 jet.Storage                        `inject:""`
	Publisher                  watermillMsg.Publisher
	Sender                     bus.Sender
	SenderWithRetry            *bus.WaitOKSender
	StateStorage               StateStorage
	ResultsMatcher             ResultMatcher
	OutgoingSender             OutgoingRequestSender
	WriteController            writecontroller.WriteController
	FlowDispatcher             dispatcher.Dispatcher
	ShutdownFlag               shutdown.Flag

	Cfg *configuration.LogicRunner
	// contains filtered or unexported fields
}

LogicRunner is a general interface of contract executor

func NewLogicRunner added in v0.0.3

func NewLogicRunner(cfg *configuration.LogicRunner, publisher watermillMsg.Publisher, sender bus.Sender) (*LogicRunner, error)

NewLogicRunner is constructor for LogicRunner

func (*LogicRunner) AddUnwantedResponse

func (lr *LogicRunner) AddUnwantedResponse(ctx context.Context, msg insolar.Message) error

func (*LogicRunner) GracefulStop

func (lr *LogicRunner) GracefulStop(ctx context.Context) error

func (*LogicRunner) Init

func (lr *LogicRunner) Init(ctx context.Context) error

func (*LogicRunner) LRI

func (lr *LogicRunner) LRI()

func (*LogicRunner) OnPulse added in v0.4.0

func (lr *LogicRunner) OnPulse(ctx context.Context, oldPulse insolar.Pulse, newPulse insolar.Pulse) error

func (*LogicRunner) Start

func (lr *LogicRunner) Start(ctx context.Context) error

Start starts logic runner component

func (*LogicRunner) Stop

func (lr *LogicRunner) Stop(ctx context.Context) error

Stop stops logic runner component and its executors

type OutgoingRequestSender

type OutgoingRequestSender interface {
	SendOutgoingRequest(ctx context.Context, reqRef insolar.Reference, req *record.OutgoingRequest) (*insolar.Reference, insolar.Arguments, *record.IncomingRequest, error)
	SendAbandonedOutgoingRequest(ctx context.Context, reqRef insolar.Reference, req *record.OutgoingRequest)
}

OutgoingRequestSender is a type-safe wrapper for an actor implementation.

type OutgoingRequestSenderMock

type OutgoingRequestSenderMock struct {
	SendAbandonedOutgoingRequestMock mOutgoingRequestSenderMockSendAbandonedOutgoingRequest

	SendOutgoingRequestMock mOutgoingRequestSenderMockSendOutgoingRequest
	// contains filtered or unexported fields
}

OutgoingRequestSenderMock implements OutgoingRequestSender

func NewOutgoingRequestSenderMock

func NewOutgoingRequestSenderMock(t minimock.Tester) *OutgoingRequestSenderMock

NewOutgoingRequestSenderMock returns a mock for OutgoingRequestSender

func (*OutgoingRequestSenderMock) MinimockFinish

func (m *OutgoingRequestSenderMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*OutgoingRequestSenderMock) MinimockSendAbandonedOutgoingRequestDone

func (m *OutgoingRequestSenderMock) MinimockSendAbandonedOutgoingRequestDone() bool

MinimockSendAbandonedOutgoingRequestDone returns true if the count of the SendAbandonedOutgoingRequest invocations corresponds the number of defined expectations

func (*OutgoingRequestSenderMock) MinimockSendAbandonedOutgoingRequestInspect

func (m *OutgoingRequestSenderMock) MinimockSendAbandonedOutgoingRequestInspect()

MinimockSendAbandonedOutgoingRequestInspect logs each unmet expectation

func (*OutgoingRequestSenderMock) MinimockSendOutgoingRequestDone

func (m *OutgoingRequestSenderMock) MinimockSendOutgoingRequestDone() bool

MinimockSendOutgoingRequestDone returns true if the count of the SendOutgoingRequest invocations corresponds the number of defined expectations

func (*OutgoingRequestSenderMock) MinimockSendOutgoingRequestInspect

func (m *OutgoingRequestSenderMock) MinimockSendOutgoingRequestInspect()

MinimockSendOutgoingRequestInspect logs each unmet expectation

func (*OutgoingRequestSenderMock) MinimockWait

func (m *OutgoingRequestSenderMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*OutgoingRequestSenderMock) SendAbandonedOutgoingRequest

func (mmSendAbandonedOutgoingRequest *OutgoingRequestSenderMock) SendAbandonedOutgoingRequest(ctx context.Context, reqRef insolar.Reference, req *record.OutgoingRequest)

SendAbandonedOutgoingRequest implements OutgoingRequestSender

func (*OutgoingRequestSenderMock) SendAbandonedOutgoingRequestAfterCounter

func (mmSendAbandonedOutgoingRequest *OutgoingRequestSenderMock) SendAbandonedOutgoingRequestAfterCounter() uint64

SendAbandonedOutgoingRequestAfterCounter returns a count of finished OutgoingRequestSenderMock.SendAbandonedOutgoingRequest invocations

func (*OutgoingRequestSenderMock) SendAbandonedOutgoingRequestBeforeCounter

func (mmSendAbandonedOutgoingRequest *OutgoingRequestSenderMock) SendAbandonedOutgoingRequestBeforeCounter() uint64

SendAbandonedOutgoingRequestBeforeCounter returns a count of OutgoingRequestSenderMock.SendAbandonedOutgoingRequest invocations

func (*OutgoingRequestSenderMock) SendOutgoingRequest

func (mmSendOutgoingRequest *OutgoingRequestSenderMock) SendOutgoingRequest(ctx context.Context, reqRef insolar.Reference, req *record.OutgoingRequest) (rp1 *insolar.Reference, a1 insolar.Arguments, ip1 *record.IncomingRequest, err error)

SendOutgoingRequest implements OutgoingRequestSender

func (*OutgoingRequestSenderMock) SendOutgoingRequestAfterCounter

func (mmSendOutgoingRequest *OutgoingRequestSenderMock) SendOutgoingRequestAfterCounter() uint64

SendOutgoingRequestAfterCounter returns a count of finished OutgoingRequestSenderMock.SendOutgoingRequest invocations

func (*OutgoingRequestSenderMock) SendOutgoingRequestBeforeCounter

func (mmSendOutgoingRequest *OutgoingRequestSenderMock) SendOutgoingRequestBeforeCounter() uint64

SendOutgoingRequestBeforeCounter returns a count of OutgoingRequestSenderMock.SendOutgoingRequest invocations

type OutgoingRequestSenderMockSendAbandonedOutgoingRequestExpectation

type OutgoingRequestSenderMockSendAbandonedOutgoingRequestExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

OutgoingRequestSenderMockSendAbandonedOutgoingRequestExpectation specifies expectation struct of the OutgoingRequestSender.SendAbandonedOutgoingRequest

type OutgoingRequestSenderMockSendAbandonedOutgoingRequestParams

type OutgoingRequestSenderMockSendAbandonedOutgoingRequestParams struct {
	// contains filtered or unexported fields
}

OutgoingRequestSenderMockSendAbandonedOutgoingRequestParams contains parameters of the OutgoingRequestSender.SendAbandonedOutgoingRequest

type OutgoingRequestSenderMockSendOutgoingRequestExpectation

type OutgoingRequestSenderMockSendOutgoingRequestExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

OutgoingRequestSenderMockSendOutgoingRequestExpectation specifies expectation struct of the OutgoingRequestSender.SendOutgoingRequest

func (*OutgoingRequestSenderMockSendOutgoingRequestExpectation) Then

Then sets up OutgoingRequestSender.SendOutgoingRequest return parameters for the expectation previously defined by the When method

type OutgoingRequestSenderMockSendOutgoingRequestParams

type OutgoingRequestSenderMockSendOutgoingRequestParams struct {
	// contains filtered or unexported fields
}

OutgoingRequestSenderMockSendOutgoingRequestParams contains parameters of the OutgoingRequestSender.SendOutgoingRequest

type OutgoingRequestSenderMockSendOutgoingRequestResults

type OutgoingRequestSenderMockSendOutgoingRequestResults struct {
	// contains filtered or unexported fields
}

OutgoingRequestSenderMockSendOutgoingRequestResults contains results of the OutgoingRequestSender.SendOutgoingRequest

type ProxyImplementationMock

type ProxyImplementationMock struct {
	DeactivateObjectMock mProxyImplementationMockDeactivateObject

	GetCodeMock mProxyImplementationMockGetCode

	RouteCallMock mProxyImplementationMockRouteCall

	SaveAsChildMock mProxyImplementationMockSaveAsChild
	// contains filtered or unexported fields
}

ProxyImplementationMock implements ProxyImplementation

func NewProxyImplementationMock

func NewProxyImplementationMock(t minimock.Tester) *ProxyImplementationMock

NewProxyImplementationMock returns a mock for ProxyImplementation

func (*ProxyImplementationMock) DeactivateObject

func (mmDeactivateObject *ProxyImplementationMock) DeactivateObject(ctx context.Context, tp1 *common.Transcript, u1 rpctypes.UpDeactivateObjectReq, up1 *rpctypes.UpDeactivateObjectResp) (err error)

DeactivateObject implements ProxyImplementation

func (*ProxyImplementationMock) DeactivateObjectAfterCounter

func (mmDeactivateObject *ProxyImplementationMock) DeactivateObjectAfterCounter() uint64

DeactivateObjectAfterCounter returns a count of finished ProxyImplementationMock.DeactivateObject invocations

func (*ProxyImplementationMock) DeactivateObjectBeforeCounter

func (mmDeactivateObject *ProxyImplementationMock) DeactivateObjectBeforeCounter() uint64

DeactivateObjectBeforeCounter returns a count of ProxyImplementationMock.DeactivateObject invocations

func (*ProxyImplementationMock) GetCode

GetCode implements ProxyImplementation

func (*ProxyImplementationMock) GetCodeAfterCounter

func (mmGetCode *ProxyImplementationMock) GetCodeAfterCounter() uint64

GetCodeAfterCounter returns a count of finished ProxyImplementationMock.GetCode invocations

func (*ProxyImplementationMock) GetCodeBeforeCounter

func (mmGetCode *ProxyImplementationMock) GetCodeBeforeCounter() uint64

GetCodeBeforeCounter returns a count of ProxyImplementationMock.GetCode invocations

func (*ProxyImplementationMock) MinimockDeactivateObjectDone

func (m *ProxyImplementationMock) MinimockDeactivateObjectDone() bool

MinimockDeactivateObjectDone returns true if the count of the DeactivateObject invocations corresponds the number of defined expectations

func (*ProxyImplementationMock) MinimockDeactivateObjectInspect

func (m *ProxyImplementationMock) MinimockDeactivateObjectInspect()

MinimockDeactivateObjectInspect logs each unmet expectation

func (*ProxyImplementationMock) MinimockFinish

func (m *ProxyImplementationMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ProxyImplementationMock) MinimockGetCodeDone

func (m *ProxyImplementationMock) MinimockGetCodeDone() bool

MinimockGetCodeDone returns true if the count of the GetCode invocations corresponds the number of defined expectations

func (*ProxyImplementationMock) MinimockGetCodeInspect

func (m *ProxyImplementationMock) MinimockGetCodeInspect()

MinimockGetCodeInspect logs each unmet expectation

func (*ProxyImplementationMock) MinimockRouteCallDone

func (m *ProxyImplementationMock) MinimockRouteCallDone() bool

MinimockRouteCallDone returns true if the count of the RouteCall invocations corresponds the number of defined expectations

func (*ProxyImplementationMock) MinimockRouteCallInspect

func (m *ProxyImplementationMock) MinimockRouteCallInspect()

MinimockRouteCallInspect logs each unmet expectation

func (*ProxyImplementationMock) MinimockSaveAsChildDone

func (m *ProxyImplementationMock) MinimockSaveAsChildDone() bool

MinimockSaveAsChildDone returns true if the count of the SaveAsChild invocations corresponds the number of defined expectations

func (*ProxyImplementationMock) MinimockSaveAsChildInspect

func (m *ProxyImplementationMock) MinimockSaveAsChildInspect()

MinimockSaveAsChildInspect logs each unmet expectation

func (*ProxyImplementationMock) MinimockWait

func (m *ProxyImplementationMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*ProxyImplementationMock) RouteCall

func (mmRouteCall *ProxyImplementationMock) RouteCall(ctx context.Context, tp1 *common.Transcript, u1 rpctypes.UpRouteReq, up1 *rpctypes.UpRouteResp) (err error)

RouteCall implements ProxyImplementation

func (*ProxyImplementationMock) RouteCallAfterCounter

func (mmRouteCall *ProxyImplementationMock) RouteCallAfterCounter() uint64

RouteCallAfterCounter returns a count of finished ProxyImplementationMock.RouteCall invocations

func (*ProxyImplementationMock) RouteCallBeforeCounter

func (mmRouteCall *ProxyImplementationMock) RouteCallBeforeCounter() uint64

RouteCallBeforeCounter returns a count of ProxyImplementationMock.RouteCall invocations

func (*ProxyImplementationMock) SaveAsChild

func (mmSaveAsChild *ProxyImplementationMock) SaveAsChild(ctx context.Context, tp1 *common.Transcript, u1 rpctypes.UpSaveAsChildReq, up1 *rpctypes.UpSaveAsChildResp) (err error)

SaveAsChild implements ProxyImplementation

func (*ProxyImplementationMock) SaveAsChildAfterCounter

func (mmSaveAsChild *ProxyImplementationMock) SaveAsChildAfterCounter() uint64

SaveAsChildAfterCounter returns a count of finished ProxyImplementationMock.SaveAsChild invocations

func (*ProxyImplementationMock) SaveAsChildBeforeCounter

func (mmSaveAsChild *ProxyImplementationMock) SaveAsChildBeforeCounter() uint64

SaveAsChildBeforeCounter returns a count of ProxyImplementationMock.SaveAsChild invocations

type ProxyImplementationMockDeactivateObjectExpectation

type ProxyImplementationMockDeactivateObjectExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ProxyImplementationMockDeactivateObjectExpectation specifies expectation struct of the ProxyImplementation.DeactivateObject

func (*ProxyImplementationMockDeactivateObjectExpectation) Then

Then sets up ProxyImplementation.DeactivateObject return parameters for the expectation previously defined by the When method

type ProxyImplementationMockDeactivateObjectParams

type ProxyImplementationMockDeactivateObjectParams struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockDeactivateObjectParams contains parameters of the ProxyImplementation.DeactivateObject

type ProxyImplementationMockDeactivateObjectResults

type ProxyImplementationMockDeactivateObjectResults struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockDeactivateObjectResults contains results of the ProxyImplementation.DeactivateObject

type ProxyImplementationMockGetCodeExpectation

type ProxyImplementationMockGetCodeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ProxyImplementationMockGetCodeExpectation specifies expectation struct of the ProxyImplementation.GetCode

func (*ProxyImplementationMockGetCodeExpectation) Then

Then sets up ProxyImplementation.GetCode return parameters for the expectation previously defined by the When method

type ProxyImplementationMockGetCodeParams

type ProxyImplementationMockGetCodeParams struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockGetCodeParams contains parameters of the ProxyImplementation.GetCode

type ProxyImplementationMockGetCodeResults

type ProxyImplementationMockGetCodeResults struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockGetCodeResults contains results of the ProxyImplementation.GetCode

type ProxyImplementationMockRouteCallExpectation

type ProxyImplementationMockRouteCallExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ProxyImplementationMockRouteCallExpectation specifies expectation struct of the ProxyImplementation.RouteCall

func (*ProxyImplementationMockRouteCallExpectation) Then

Then sets up ProxyImplementation.RouteCall return parameters for the expectation previously defined by the When method

type ProxyImplementationMockRouteCallParams

type ProxyImplementationMockRouteCallParams struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockRouteCallParams contains parameters of the ProxyImplementation.RouteCall

type ProxyImplementationMockRouteCallResults

type ProxyImplementationMockRouteCallResults struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockRouteCallResults contains results of the ProxyImplementation.RouteCall

type ProxyImplementationMockSaveAsChildExpectation

type ProxyImplementationMockSaveAsChildExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ProxyImplementationMockSaveAsChildExpectation specifies expectation struct of the ProxyImplementation.SaveAsChild

func (*ProxyImplementationMockSaveAsChildExpectation) Then

Then sets up ProxyImplementation.SaveAsChild return parameters for the expectation previously defined by the When method

type ProxyImplementationMockSaveAsChildParams

type ProxyImplementationMockSaveAsChildParams struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockSaveAsChildParams contains parameters of the ProxyImplementation.SaveAsChild

type ProxyImplementationMockSaveAsChildResults

type ProxyImplementationMockSaveAsChildResults struct {
	// contains filtered or unexported fields
}

ProxyImplementationMockSaveAsChildResults contains results of the ProxyImplementation.SaveAsChild

type RPCMethods

type RPCMethods struct {
	// contains filtered or unexported fields
}

func (*RPCMethods) DeactivateObject

DeactivateObject is an RPC saving data as memory of a contract as child a parent

func (*RPCMethods) GetCode

GetCode is an RPC retrieving a code by its reference

func (*RPCMethods) RouteCall

func (m *RPCMethods) RouteCall(req rpctypes.UpRouteReq, rep *rpctypes.UpRouteResp) error

RouteCall routes call from a contract to a contract through event bus.

func (*RPCMethods) SaveAsChild

SaveAsChild is an RPC saving data as memory of a contract as child a parent

type RecordErrorResult

type RecordErrorResult struct {
	// contains filtered or unexported fields
}

func (*RecordErrorResult) Proceed

func (r *RecordErrorResult) Proceed(ctx context.Context) error

type RegisterIncomingRequest

type RegisterIncomingRequest struct {
	ArtifactManager artifacts.Client
	// contains filtered or unexported fields
}

func NewRegisterIncomingRequest

func NewRegisterIncomingRequest(request record.IncomingRequest, dep *Dependencies) *RegisterIncomingRequest

func (*RegisterIncomingRequest) Proceed

func (r *RegisterIncomingRequest) Proceed(ctx context.Context) error

type RequestsExecutor

type RequestsExecutor interface {
	ExecuteAndSave(ctx context.Context, current *common.Transcript) (insolar.Reply, error)
	Execute(ctx context.Context, current *common.Transcript) (artifacts.RequestResult, error)
	Save(ctx context.Context, current *common.Transcript, res artifacts.RequestResult) (insolar.Reply, error)
	SendReply(ctx context.Context, current *common.Transcript, re insolar.Reply, err error)
}

func NewRequestsExecutor

func NewRequestsExecutor() RequestsExecutor

type RequestsExecutorMock

type RequestsExecutorMock struct {
	ExecuteMock mRequestsExecutorMockExecute

	ExecuteAndSaveMock mRequestsExecutorMockExecuteAndSave

	SaveMock mRequestsExecutorMockSave

	SendReplyMock mRequestsExecutorMockSendReply
	// contains filtered or unexported fields
}

RequestsExecutorMock implements RequestsExecutor

func NewRequestsExecutorMock

func NewRequestsExecutorMock(t minimock.Tester) *RequestsExecutorMock

NewRequestsExecutorMock returns a mock for RequestsExecutor

func (*RequestsExecutorMock) Execute

func (mmExecute *RequestsExecutorMock) Execute(ctx context.Context, current *common.Transcript) (r1 artifacts.RequestResult, err error)

Execute implements RequestsExecutor

func (*RequestsExecutorMock) ExecuteAfterCounter

func (mmExecute *RequestsExecutorMock) ExecuteAfterCounter() uint64

ExecuteAfterCounter returns a count of finished RequestsExecutorMock.Execute invocations

func (*RequestsExecutorMock) ExecuteAndSave

func (mmExecuteAndSave *RequestsExecutorMock) ExecuteAndSave(ctx context.Context, current *common.Transcript) (r1 insolar.Reply, err error)

ExecuteAndSave implements RequestsExecutor

func (*RequestsExecutorMock) ExecuteAndSaveAfterCounter

func (mmExecuteAndSave *RequestsExecutorMock) ExecuteAndSaveAfterCounter() uint64

ExecuteAndSaveAfterCounter returns a count of finished RequestsExecutorMock.ExecuteAndSave invocations

func (*RequestsExecutorMock) ExecuteAndSaveBeforeCounter

func (mmExecuteAndSave *RequestsExecutorMock) ExecuteAndSaveBeforeCounter() uint64

ExecuteAndSaveBeforeCounter returns a count of RequestsExecutorMock.ExecuteAndSave invocations

func (*RequestsExecutorMock) ExecuteBeforeCounter

func (mmExecute *RequestsExecutorMock) ExecuteBeforeCounter() uint64

ExecuteBeforeCounter returns a count of RequestsExecutorMock.Execute invocations

func (*RequestsExecutorMock) MinimockExecuteAndSaveDone

func (m *RequestsExecutorMock) MinimockExecuteAndSaveDone() bool

MinimockExecuteAndSaveDone returns true if the count of the ExecuteAndSave invocations corresponds the number of defined expectations

func (*RequestsExecutorMock) MinimockExecuteAndSaveInspect

func (m *RequestsExecutorMock) MinimockExecuteAndSaveInspect()

MinimockExecuteAndSaveInspect logs each unmet expectation

func (*RequestsExecutorMock) MinimockExecuteDone

func (m *RequestsExecutorMock) MinimockExecuteDone() bool

MinimockExecuteDone returns true if the count of the Execute invocations corresponds the number of defined expectations

func (*RequestsExecutorMock) MinimockExecuteInspect

func (m *RequestsExecutorMock) MinimockExecuteInspect()

MinimockExecuteInspect logs each unmet expectation

func (*RequestsExecutorMock) MinimockFinish

func (m *RequestsExecutorMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*RequestsExecutorMock) MinimockSaveDone

func (m *RequestsExecutorMock) MinimockSaveDone() bool

MinimockSaveDone returns true if the count of the Save invocations corresponds the number of defined expectations

func (*RequestsExecutorMock) MinimockSaveInspect

func (m *RequestsExecutorMock) MinimockSaveInspect()

MinimockSaveInspect logs each unmet expectation

func (*RequestsExecutorMock) MinimockSendReplyDone

func (m *RequestsExecutorMock) MinimockSendReplyDone() bool

MinimockSendReplyDone returns true if the count of the SendReply invocations corresponds the number of defined expectations

func (*RequestsExecutorMock) MinimockSendReplyInspect

func (m *RequestsExecutorMock) MinimockSendReplyInspect()

MinimockSendReplyInspect logs each unmet expectation

func (*RequestsExecutorMock) MinimockWait

func (m *RequestsExecutorMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*RequestsExecutorMock) Save

func (mmSave *RequestsExecutorMock) Save(ctx context.Context, current *common.Transcript, res artifacts.RequestResult) (r1 insolar.Reply, err error)

Save implements RequestsExecutor

func (*RequestsExecutorMock) SaveAfterCounter

func (mmSave *RequestsExecutorMock) SaveAfterCounter() uint64

SaveAfterCounter returns a count of finished RequestsExecutorMock.Save invocations

func (*RequestsExecutorMock) SaveBeforeCounter

func (mmSave *RequestsExecutorMock) SaveBeforeCounter() uint64

SaveBeforeCounter returns a count of RequestsExecutorMock.Save invocations

func (*RequestsExecutorMock) SendReply

func (mmSendReply *RequestsExecutorMock) SendReply(ctx context.Context, current *common.Transcript, re insolar.Reply, err error)

SendReply implements RequestsExecutor

func (*RequestsExecutorMock) SendReplyAfterCounter

func (mmSendReply *RequestsExecutorMock) SendReplyAfterCounter() uint64

SendReplyAfterCounter returns a count of finished RequestsExecutorMock.SendReply invocations

func (*RequestsExecutorMock) SendReplyBeforeCounter

func (mmSendReply *RequestsExecutorMock) SendReplyBeforeCounter() uint64

SendReplyBeforeCounter returns a count of RequestsExecutorMock.SendReply invocations

type RequestsExecutorMockExecuteAndSaveExpectation

type RequestsExecutorMockExecuteAndSaveExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RequestsExecutorMockExecuteAndSaveExpectation specifies expectation struct of the RequestsExecutor.ExecuteAndSave

func (*RequestsExecutorMockExecuteAndSaveExpectation) Then

Then sets up RequestsExecutor.ExecuteAndSave return parameters for the expectation previously defined by the When method

type RequestsExecutorMockExecuteAndSaveParams

type RequestsExecutorMockExecuteAndSaveParams struct {
	// contains filtered or unexported fields
}

RequestsExecutorMockExecuteAndSaveParams contains parameters of the RequestsExecutor.ExecuteAndSave

type RequestsExecutorMockExecuteAndSaveResults

type RequestsExecutorMockExecuteAndSaveResults struct {
	// contains filtered or unexported fields
}

RequestsExecutorMockExecuteAndSaveResults contains results of the RequestsExecutor.ExecuteAndSave

type RequestsExecutorMockExecuteExpectation

type RequestsExecutorMockExecuteExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RequestsExecutorMockExecuteExpectation specifies expectation struct of the RequestsExecutor.Execute

func (*RequestsExecutorMockExecuteExpectation) Then

Then sets up RequestsExecutor.Execute return parameters for the expectation previously defined by the When method

type RequestsExecutorMockExecuteParams

type RequestsExecutorMockExecuteParams struct {
	// contains filtered or unexported fields
}

RequestsExecutorMockExecuteParams contains parameters of the RequestsExecutor.Execute

type RequestsExecutorMockExecuteResults

type RequestsExecutorMockExecuteResults struct {
	// contains filtered or unexported fields
}

RequestsExecutorMockExecuteResults contains results of the RequestsExecutor.Execute

type RequestsExecutorMockSaveExpectation

type RequestsExecutorMockSaveExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RequestsExecutorMockSaveExpectation specifies expectation struct of the RequestsExecutor.Save

func (*RequestsExecutorMockSaveExpectation) Then

Then sets up RequestsExecutor.Save return parameters for the expectation previously defined by the When method

type RequestsExecutorMockSaveParams

type RequestsExecutorMockSaveParams struct {
	// contains filtered or unexported fields
}

RequestsExecutorMockSaveParams contains parameters of the RequestsExecutor.Save

type RequestsExecutorMockSaveResults

type RequestsExecutorMockSaveResults struct {
	// contains filtered or unexported fields
}

RequestsExecutorMockSaveResults contains results of the RequestsExecutor.Save

type RequestsExecutorMockSendReplyExpectation

type RequestsExecutorMockSendReplyExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RequestsExecutorMockSendReplyExpectation specifies expectation struct of the RequestsExecutor.SendReply

type RequestsExecutorMockSendReplyParams

type RequestsExecutorMockSendReplyParams struct {
	// contains filtered or unexported fields
}

RequestsExecutorMockSendReplyParams contains parameters of the RequestsExecutor.SendReply

type RequestsFetcher

type RequestsFetcher interface {
	FetchPendings(ctx context.Context)
	Abort(ctx context.Context)
}

type RequestsFetcherMock

type RequestsFetcherMock struct {
	AbortMock mRequestsFetcherMockAbort

	FetchPendingsMock mRequestsFetcherMockFetchPendings
	// contains filtered or unexported fields
}

RequestsFetcherMock implements RequestsFetcher

func NewRequestsFetcherMock

func NewRequestsFetcherMock(t minimock.Tester) *RequestsFetcherMock

NewRequestsFetcherMock returns a mock for RequestsFetcher

func (*RequestsFetcherMock) Abort

func (mmAbort *RequestsFetcherMock) Abort(ctx context.Context)

Abort implements RequestsFetcher

func (*RequestsFetcherMock) AbortAfterCounter

func (mmAbort *RequestsFetcherMock) AbortAfterCounter() uint64

AbortAfterCounter returns a count of finished RequestsFetcherMock.Abort invocations

func (*RequestsFetcherMock) AbortBeforeCounter

func (mmAbort *RequestsFetcherMock) AbortBeforeCounter() uint64

AbortBeforeCounter returns a count of RequestsFetcherMock.Abort invocations

func (*RequestsFetcherMock) FetchPendings

func (mmFetchPendings *RequestsFetcherMock) FetchPendings(ctx context.Context)

FetchPendings implements RequestsFetcher

func (*RequestsFetcherMock) FetchPendingsAfterCounter

func (mmFetchPendings *RequestsFetcherMock) FetchPendingsAfterCounter() uint64

FetchPendingsAfterCounter returns a count of finished RequestsFetcherMock.FetchPendings invocations

func (*RequestsFetcherMock) FetchPendingsBeforeCounter

func (mmFetchPendings *RequestsFetcherMock) FetchPendingsBeforeCounter() uint64

FetchPendingsBeforeCounter returns a count of RequestsFetcherMock.FetchPendings invocations

func (*RequestsFetcherMock) MinimockAbortDone

func (m *RequestsFetcherMock) MinimockAbortDone() bool

MinimockAbortDone returns true if the count of the Abort invocations corresponds the number of defined expectations

func (*RequestsFetcherMock) MinimockAbortInspect

func (m *RequestsFetcherMock) MinimockAbortInspect()

MinimockAbortInspect logs each unmet expectation

func (*RequestsFetcherMock) MinimockFetchPendingsDone

func (m *RequestsFetcherMock) MinimockFetchPendingsDone() bool

MinimockFetchPendingsDone returns true if the count of the FetchPendings invocations corresponds the number of defined expectations

func (*RequestsFetcherMock) MinimockFetchPendingsInspect

func (m *RequestsFetcherMock) MinimockFetchPendingsInspect()

MinimockFetchPendingsInspect logs each unmet expectation

func (*RequestsFetcherMock) MinimockFinish

func (m *RequestsFetcherMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*RequestsFetcherMock) MinimockWait

func (m *RequestsFetcherMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

type RequestsFetcherMockAbortExpectation

type RequestsFetcherMockAbortExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RequestsFetcherMockAbortExpectation specifies expectation struct of the RequestsFetcher.Abort

type RequestsFetcherMockAbortParams

type RequestsFetcherMockAbortParams struct {
	// contains filtered or unexported fields
}

RequestsFetcherMockAbortParams contains parameters of the RequestsFetcher.Abort

type RequestsFetcherMockFetchPendingsExpectation

type RequestsFetcherMockFetchPendingsExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RequestsFetcherMockFetchPendingsExpectation specifies expectation struct of the RequestsFetcher.FetchPendings

type RequestsFetcherMockFetchPendingsParams

type RequestsFetcherMockFetchPendingsParams struct {
	// contains filtered or unexported fields
}

RequestsFetcherMockFetchPendingsParams contains parameters of the RequestsFetcher.FetchPendings

type ResultMatcher

type ResultMatcher interface {
	AddStillExecution(ctx context.Context, msg *payload.StillExecuting)
	AddUnwantedResponse(ctx context.Context, msg *message.ReturnResults) error
	Clear()
}

type ResultMatcherMock

type ResultMatcherMock struct {
	AddStillExecutionMock mResultMatcherMockAddStillExecution

	AddUnwantedResponseMock mResultMatcherMockAddUnwantedResponse

	ClearMock mResultMatcherMockClear
	// contains filtered or unexported fields
}

ResultMatcherMock implements ResultMatcher

func NewResultMatcherMock

func NewResultMatcherMock(t minimock.Tester) *ResultMatcherMock

NewResultMatcherMock returns a mock for ResultMatcher

func (*ResultMatcherMock) AddStillExecution

func (mmAddStillExecution *ResultMatcherMock) AddStillExecution(ctx context.Context, msg *payload.StillExecuting)

AddStillExecution implements ResultMatcher

func (*ResultMatcherMock) AddStillExecutionAfterCounter

func (mmAddStillExecution *ResultMatcherMock) AddStillExecutionAfterCounter() uint64

AddStillExecutionAfterCounter returns a count of finished ResultMatcherMock.AddStillExecution invocations

func (*ResultMatcherMock) AddStillExecutionBeforeCounter

func (mmAddStillExecution *ResultMatcherMock) AddStillExecutionBeforeCounter() uint64

AddStillExecutionBeforeCounter returns a count of ResultMatcherMock.AddStillExecution invocations

func (*ResultMatcherMock) AddUnwantedResponse

func (mmAddUnwantedResponse *ResultMatcherMock) AddUnwantedResponse(ctx context.Context, msg *message.ReturnResults) (err error)

AddUnwantedResponse implements ResultMatcher

func (*ResultMatcherMock) AddUnwantedResponseAfterCounter

func (mmAddUnwantedResponse *ResultMatcherMock) AddUnwantedResponseAfterCounter() uint64

AddUnwantedResponseAfterCounter returns a count of finished ResultMatcherMock.AddUnwantedResponse invocations

func (*ResultMatcherMock) AddUnwantedResponseBeforeCounter

func (mmAddUnwantedResponse *ResultMatcherMock) AddUnwantedResponseBeforeCounter() uint64

AddUnwantedResponseBeforeCounter returns a count of ResultMatcherMock.AddUnwantedResponse invocations

func (*ResultMatcherMock) Clear

func (mmClear *ResultMatcherMock) Clear()

Clear implements ResultMatcher

func (*ResultMatcherMock) ClearAfterCounter

func (mmClear *ResultMatcherMock) ClearAfterCounter() uint64

ClearAfterCounter returns a count of finished ResultMatcherMock.Clear invocations

func (*ResultMatcherMock) ClearBeforeCounter

func (mmClear *ResultMatcherMock) ClearBeforeCounter() uint64

ClearBeforeCounter returns a count of ResultMatcherMock.Clear invocations

func (*ResultMatcherMock) MinimockAddStillExecutionDone

func (m *ResultMatcherMock) MinimockAddStillExecutionDone() bool

MinimockAddStillExecutionDone returns true if the count of the AddStillExecution invocations corresponds the number of defined expectations

func (*ResultMatcherMock) MinimockAddStillExecutionInspect

func (m *ResultMatcherMock) MinimockAddStillExecutionInspect()

MinimockAddStillExecutionInspect logs each unmet expectation

func (*ResultMatcherMock) MinimockAddUnwantedResponseDone

func (m *ResultMatcherMock) MinimockAddUnwantedResponseDone() bool

MinimockAddUnwantedResponseDone returns true if the count of the AddUnwantedResponse invocations corresponds the number of defined expectations

func (*ResultMatcherMock) MinimockAddUnwantedResponseInspect

func (m *ResultMatcherMock) MinimockAddUnwantedResponseInspect()

MinimockAddUnwantedResponseInspect logs each unmet expectation

func (*ResultMatcherMock) MinimockClearDone

func (m *ResultMatcherMock) MinimockClearDone() bool

MinimockClearDone returns true if the count of the Clear invocations corresponds the number of defined expectations

func (*ResultMatcherMock) MinimockClearInspect

func (m *ResultMatcherMock) MinimockClearInspect()

MinimockClearInspect logs each unmet expectation

func (*ResultMatcherMock) MinimockFinish

func (m *ResultMatcherMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ResultMatcherMock) MinimockWait

func (m *ResultMatcherMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

type ResultMatcherMockAddStillExecutionExpectation

type ResultMatcherMockAddStillExecutionExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ResultMatcherMockAddStillExecutionExpectation specifies expectation struct of the ResultMatcher.AddStillExecution

type ResultMatcherMockAddStillExecutionParams

type ResultMatcherMockAddStillExecutionParams struct {
	// contains filtered or unexported fields
}

ResultMatcherMockAddStillExecutionParams contains parameters of the ResultMatcher.AddStillExecution

type ResultMatcherMockAddUnwantedResponseExpectation

type ResultMatcherMockAddUnwantedResponseExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ResultMatcherMockAddUnwantedResponseExpectation specifies expectation struct of the ResultMatcher.AddUnwantedResponse

func (*ResultMatcherMockAddUnwantedResponseExpectation) Then

Then sets up ResultMatcher.AddUnwantedResponse return parameters for the expectation previously defined by the When method

type ResultMatcherMockAddUnwantedResponseParams

type ResultMatcherMockAddUnwantedResponseParams struct {
	// contains filtered or unexported fields
}

ResultMatcherMockAddUnwantedResponseParams contains parameters of the ResultMatcher.AddUnwantedResponse

type ResultMatcherMockAddUnwantedResponseResults

type ResultMatcherMockAddUnwantedResponseResults struct {
	// contains filtered or unexported fields
}

ResultMatcherMockAddUnwantedResponseResults contains results of the ResultMatcher.AddUnwantedResponse

type ResultMatcherMockClearExpectation

type ResultMatcherMockClearExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ResultMatcherMockClearExpectation specifies expectation struct of the ResultMatcher.Clear

type StateStorage

type StateStorage interface {
	UpsertExecutionState(ref insolar.Reference) ExecutionBrokerI
	GetExecutionState(ref insolar.Reference) ExecutionBrokerI
	GetExecutionRegistry(ref insolar.Reference) executionregistry.ExecutionRegistry

	IsEmpty() bool
	OnPulse(ctx context.Context, pulse insolar.Pulse) map[insolar.Reference][]payload.Payload
}

func NewStateStorage

func NewStateStorage(
	publisher watermillMsg.Publisher,
	requestsExecutor RequestsExecutor,
	sender bus.Sender,
	jetCoordinator jet.Coordinator,
	pulseAccessor pulse.Accessor,
	artifactsManager artifacts.Client,
	outgoingSender OutgoingRequestSender,
	shutdownFlag shutdown.Flag,
) StateStorage

type StateStorageMock

type StateStorageMock struct {
	GetExecutionRegistryMock mStateStorageMockGetExecutionRegistry

	GetExecutionStateMock mStateStorageMockGetExecutionState

	IsEmptyMock mStateStorageMockIsEmpty

	OnPulseMock mStateStorageMockOnPulse

	UpsertExecutionStateMock mStateStorageMockUpsertExecutionState
	// contains filtered or unexported fields
}

StateStorageMock implements StateStorage

func NewStateStorageMock

func NewStateStorageMock(t minimock.Tester) *StateStorageMock

NewStateStorageMock returns a mock for StateStorage

func (*StateStorageMock) GetExecutionRegistry

func (mmGetExecutionRegistry *StateStorageMock) GetExecutionRegistry(ref insolar.Reference) (e1 executionregistry.ExecutionRegistry)

GetExecutionRegistry implements StateStorage

func (*StateStorageMock) GetExecutionRegistryAfterCounter

func (mmGetExecutionRegistry *StateStorageMock) GetExecutionRegistryAfterCounter() uint64

GetExecutionRegistryAfterCounter returns a count of finished StateStorageMock.GetExecutionRegistry invocations

func (*StateStorageMock) GetExecutionRegistryBeforeCounter

func (mmGetExecutionRegistry *StateStorageMock) GetExecutionRegistryBeforeCounter() uint64

GetExecutionRegistryBeforeCounter returns a count of StateStorageMock.GetExecutionRegistry invocations

func (*StateStorageMock) GetExecutionState

func (mmGetExecutionState *StateStorageMock) GetExecutionState(ref insolar.Reference) (e1 ExecutionBrokerI)

GetExecutionState implements StateStorage

func (*StateStorageMock) GetExecutionStateAfterCounter

func (mmGetExecutionState *StateStorageMock) GetExecutionStateAfterCounter() uint64

GetExecutionStateAfterCounter returns a count of finished StateStorageMock.GetExecutionState invocations

func (*StateStorageMock) GetExecutionStateBeforeCounter

func (mmGetExecutionState *StateStorageMock) GetExecutionStateBeforeCounter() uint64

GetExecutionStateBeforeCounter returns a count of StateStorageMock.GetExecutionState invocations

func (*StateStorageMock) IsEmpty

func (mmIsEmpty *StateStorageMock) IsEmpty() (b1 bool)

IsEmpty implements StateStorage

func (*StateStorageMock) IsEmptyAfterCounter

func (mmIsEmpty *StateStorageMock) IsEmptyAfterCounter() uint64

IsEmptyAfterCounter returns a count of finished StateStorageMock.IsEmpty invocations

func (*StateStorageMock) IsEmptyBeforeCounter

func (mmIsEmpty *StateStorageMock) IsEmptyBeforeCounter() uint64

IsEmptyBeforeCounter returns a count of StateStorageMock.IsEmpty invocations

func (*StateStorageMock) MinimockFinish

func (m *StateStorageMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*StateStorageMock) MinimockGetExecutionRegistryDone

func (m *StateStorageMock) MinimockGetExecutionRegistryDone() bool

MinimockGetExecutionRegistryDone returns true if the count of the GetExecutionRegistry invocations corresponds the number of defined expectations

func (*StateStorageMock) MinimockGetExecutionRegistryInspect

func (m *StateStorageMock) MinimockGetExecutionRegistryInspect()

MinimockGetExecutionRegistryInspect logs each unmet expectation

func (*StateStorageMock) MinimockGetExecutionStateDone

func (m *StateStorageMock) MinimockGetExecutionStateDone() bool

MinimockGetExecutionStateDone returns true if the count of the GetExecutionState invocations corresponds the number of defined expectations

func (*StateStorageMock) MinimockGetExecutionStateInspect

func (m *StateStorageMock) MinimockGetExecutionStateInspect()

MinimockGetExecutionStateInspect logs each unmet expectation

func (*StateStorageMock) MinimockIsEmptyDone

func (m *StateStorageMock) MinimockIsEmptyDone() bool

MinimockIsEmptyDone returns true if the count of the IsEmpty invocations corresponds the number of defined expectations

func (*StateStorageMock) MinimockIsEmptyInspect

func (m *StateStorageMock) MinimockIsEmptyInspect()

MinimockIsEmptyInspect logs each unmet expectation

func (*StateStorageMock) MinimockOnPulseDone

func (m *StateStorageMock) MinimockOnPulseDone() bool

MinimockOnPulseDone returns true if the count of the OnPulse invocations corresponds the number of defined expectations

func (*StateStorageMock) MinimockOnPulseInspect

func (m *StateStorageMock) MinimockOnPulseInspect()

MinimockOnPulseInspect logs each unmet expectation

func (*StateStorageMock) MinimockUpsertExecutionStateDone

func (m *StateStorageMock) MinimockUpsertExecutionStateDone() bool

MinimockUpsertExecutionStateDone returns true if the count of the UpsertExecutionState invocations corresponds the number of defined expectations

func (*StateStorageMock) MinimockUpsertExecutionStateInspect

func (m *StateStorageMock) MinimockUpsertExecutionStateInspect()

MinimockUpsertExecutionStateInspect logs each unmet expectation

func (*StateStorageMock) MinimockWait

func (m *StateStorageMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*StateStorageMock) OnPulse

func (mmOnPulse *StateStorageMock) OnPulse(ctx context.Context, pulse insolar.Pulse) (m1 map[insolar.Reference][]payload.Payload)

OnPulse implements StateStorage

func (*StateStorageMock) OnPulseAfterCounter

func (mmOnPulse *StateStorageMock) OnPulseAfterCounter() uint64

OnPulseAfterCounter returns a count of finished StateStorageMock.OnPulse invocations

func (*StateStorageMock) OnPulseBeforeCounter

func (mmOnPulse *StateStorageMock) OnPulseBeforeCounter() uint64

OnPulseBeforeCounter returns a count of StateStorageMock.OnPulse invocations

func (*StateStorageMock) UpsertExecutionState

func (mmUpsertExecutionState *StateStorageMock) UpsertExecutionState(ref insolar.Reference) (e1 ExecutionBrokerI)

UpsertExecutionState implements StateStorage

func (*StateStorageMock) UpsertExecutionStateAfterCounter

func (mmUpsertExecutionState *StateStorageMock) UpsertExecutionStateAfterCounter() uint64

UpsertExecutionStateAfterCounter returns a count of finished StateStorageMock.UpsertExecutionState invocations

func (*StateStorageMock) UpsertExecutionStateBeforeCounter

func (mmUpsertExecutionState *StateStorageMock) UpsertExecutionStateBeforeCounter() uint64

UpsertExecutionStateBeforeCounter returns a count of StateStorageMock.UpsertExecutionState invocations

type StateStorageMockGetExecutionRegistryExpectation

type StateStorageMockGetExecutionRegistryExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StateStorageMockGetExecutionRegistryExpectation specifies expectation struct of the StateStorage.GetExecutionRegistry

func (*StateStorageMockGetExecutionRegistryExpectation) Then

Then sets up StateStorage.GetExecutionRegistry return parameters for the expectation previously defined by the When method

type StateStorageMockGetExecutionRegistryParams

type StateStorageMockGetExecutionRegistryParams struct {
	// contains filtered or unexported fields
}

StateStorageMockGetExecutionRegistryParams contains parameters of the StateStorage.GetExecutionRegistry

type StateStorageMockGetExecutionRegistryResults

type StateStorageMockGetExecutionRegistryResults struct {
	// contains filtered or unexported fields
}

StateStorageMockGetExecutionRegistryResults contains results of the StateStorage.GetExecutionRegistry

type StateStorageMockGetExecutionStateExpectation

type StateStorageMockGetExecutionStateExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StateStorageMockGetExecutionStateExpectation specifies expectation struct of the StateStorage.GetExecutionState

func (*StateStorageMockGetExecutionStateExpectation) Then

Then sets up StateStorage.GetExecutionState return parameters for the expectation previously defined by the When method

type StateStorageMockGetExecutionStateParams

type StateStorageMockGetExecutionStateParams struct {
	// contains filtered or unexported fields
}

StateStorageMockGetExecutionStateParams contains parameters of the StateStorage.GetExecutionState

type StateStorageMockGetExecutionStateResults

type StateStorageMockGetExecutionStateResults struct {
	// contains filtered or unexported fields
}

StateStorageMockGetExecutionStateResults contains results of the StateStorage.GetExecutionState

type StateStorageMockIsEmptyExpectation

type StateStorageMockIsEmptyExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StateStorageMockIsEmptyExpectation specifies expectation struct of the StateStorage.IsEmpty

type StateStorageMockIsEmptyResults

type StateStorageMockIsEmptyResults struct {
	// contains filtered or unexported fields
}

StateStorageMockIsEmptyResults contains results of the StateStorage.IsEmpty

type StateStorageMockOnPulseExpectation

type StateStorageMockOnPulseExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StateStorageMockOnPulseExpectation specifies expectation struct of the StateStorage.OnPulse

func (*StateStorageMockOnPulseExpectation) Then

Then sets up StateStorage.OnPulse return parameters for the expectation previously defined by the When method

type StateStorageMockOnPulseParams

type StateStorageMockOnPulseParams struct {
	// contains filtered or unexported fields
}

StateStorageMockOnPulseParams contains parameters of the StateStorage.OnPulse

type StateStorageMockOnPulseResults

type StateStorageMockOnPulseResults struct {
	// contains filtered or unexported fields
}

StateStorageMockOnPulseResults contains results of the StateStorage.OnPulse

type StateStorageMockUpsertExecutionStateExpectation

type StateStorageMockUpsertExecutionStateExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StateStorageMockUpsertExecutionStateExpectation specifies expectation struct of the StateStorage.UpsertExecutionState

func (*StateStorageMockUpsertExecutionStateExpectation) Then

Then sets up StateStorage.UpsertExecutionState return parameters for the expectation previously defined by the When method

type StateStorageMockUpsertExecutionStateParams

type StateStorageMockUpsertExecutionStateParams struct {
	// contains filtered or unexported fields
}

StateStorageMockUpsertExecutionStateParams contains parameters of the StateStorage.UpsertExecutionState

type StateStorageMockUpsertExecutionStateResults

type StateStorageMockUpsertExecutionStateResults struct {
	// contains filtered or unexported fields
}

StateStorageMockUpsertExecutionStateResults contains results of the StateStorage.UpsertExecutionState

Directories

Path Synopsis
Package builtin is implementation of builtin contracts engine
Package builtin is implementation of builtin contracts engine
foundation
Package foundation server implementation of smartcontract functions
Package foundation server implementation of smartcontract functions
Package goplugin - golang plugin in docker runner
Package goplugin - golang plugin in docker runner
Package pulsemanager is responsible for all pulse operations.
Package pulsemanager is responsible for all pulse operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL