executionregistry

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyRegistered = errors.New("trying to register task that is executing right now")
)

Functions

This section is empty.

Types

type ExecutionRegistry

type ExecutionRegistry interface {
	Register(ctx context.Context, transcript *common.Transcript) error
	Done(transcript *common.Transcript) bool

	Length() int
	IsEmpty() bool
	OnPulse(ctx context.Context) []payload.Payload
	GetActiveTranscript(req insolar.Reference) *common.Transcript
}

func New

func New(
	objectRef insolar.Reference,
	jetCoordinator jet.Coordinator,
) ExecutionRegistry

type ExecutionRegistryMock

type ExecutionRegistryMock struct {
	DoneMock mExecutionRegistryMockDone

	GetActiveTranscriptMock mExecutionRegistryMockGetActiveTranscript

	IsEmptyMock mExecutionRegistryMockIsEmpty

	LengthMock mExecutionRegistryMockLength

	OnPulseMock mExecutionRegistryMockOnPulse

	RegisterMock mExecutionRegistryMockRegister
	// contains filtered or unexported fields
}

ExecutionRegistryMock implements ExecutionRegistry

func NewExecutionRegistryMock

func NewExecutionRegistryMock(t minimock.Tester) *ExecutionRegistryMock

NewExecutionRegistryMock returns a mock for ExecutionRegistry

func (*ExecutionRegistryMock) Done

func (mmDone *ExecutionRegistryMock) Done(transcript *common.Transcript) (b1 bool)

Done implements ExecutionRegistry

func (*ExecutionRegistryMock) DoneAfterCounter

func (mmDone *ExecutionRegistryMock) DoneAfterCounter() uint64

DoneAfterCounter returns a count of finished ExecutionRegistryMock.Done invocations

func (*ExecutionRegistryMock) DoneBeforeCounter

func (mmDone *ExecutionRegistryMock) DoneBeforeCounter() uint64

DoneBeforeCounter returns a count of ExecutionRegistryMock.Done invocations

func (*ExecutionRegistryMock) GetActiveTranscript

func (mmGetActiveTranscript *ExecutionRegistryMock) GetActiveTranscript(req insolar.Reference) (tp1 *common.Transcript)

GetActiveTranscript implements ExecutionRegistry

func (*ExecutionRegistryMock) GetActiveTranscriptAfterCounter

func (mmGetActiveTranscript *ExecutionRegistryMock) GetActiveTranscriptAfterCounter() uint64

GetActiveTranscriptAfterCounter returns a count of finished ExecutionRegistryMock.GetActiveTranscript invocations

func (*ExecutionRegistryMock) GetActiveTranscriptBeforeCounter

func (mmGetActiveTranscript *ExecutionRegistryMock) GetActiveTranscriptBeforeCounter() uint64

GetActiveTranscriptBeforeCounter returns a count of ExecutionRegistryMock.GetActiveTranscript invocations

func (*ExecutionRegistryMock) IsEmpty

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

IsEmpty implements ExecutionRegistry

func (*ExecutionRegistryMock) IsEmptyAfterCounter

func (mmIsEmpty *ExecutionRegistryMock) IsEmptyAfterCounter() uint64

IsEmptyAfterCounter returns a count of finished ExecutionRegistryMock.IsEmpty invocations

func (*ExecutionRegistryMock) IsEmptyBeforeCounter

func (mmIsEmpty *ExecutionRegistryMock) IsEmptyBeforeCounter() uint64

IsEmptyBeforeCounter returns a count of ExecutionRegistryMock.IsEmpty invocations

func (*ExecutionRegistryMock) Length

func (mmLength *ExecutionRegistryMock) Length() (i1 int)

Length implements ExecutionRegistry

func (*ExecutionRegistryMock) LengthAfterCounter

func (mmLength *ExecutionRegistryMock) LengthAfterCounter() uint64

LengthAfterCounter returns a count of finished ExecutionRegistryMock.Length invocations

func (*ExecutionRegistryMock) LengthBeforeCounter

func (mmLength *ExecutionRegistryMock) LengthBeforeCounter() uint64

LengthBeforeCounter returns a count of ExecutionRegistryMock.Length invocations

func (*ExecutionRegistryMock) MinimockDoneDone

func (m *ExecutionRegistryMock) MinimockDoneDone() bool

MinimockDoneDone returns true if the count of the Done invocations corresponds the number of defined expectations

func (*ExecutionRegistryMock) MinimockDoneInspect

func (m *ExecutionRegistryMock) MinimockDoneInspect()

MinimockDoneInspect logs each unmet expectation

func (*ExecutionRegistryMock) MinimockFinish

func (m *ExecutionRegistryMock) MinimockFinish()

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

func (*ExecutionRegistryMock) MinimockGetActiveTranscriptDone

func (m *ExecutionRegistryMock) MinimockGetActiveTranscriptDone() bool

MinimockGetActiveTranscriptDone returns true if the count of the GetActiveTranscript invocations corresponds the number of defined expectations

func (*ExecutionRegistryMock) MinimockGetActiveTranscriptInspect

func (m *ExecutionRegistryMock) MinimockGetActiveTranscriptInspect()

MinimockGetActiveTranscriptInspect logs each unmet expectation

func (*ExecutionRegistryMock) MinimockIsEmptyDone

func (m *ExecutionRegistryMock) MinimockIsEmptyDone() bool

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

func (*ExecutionRegistryMock) MinimockIsEmptyInspect

func (m *ExecutionRegistryMock) MinimockIsEmptyInspect()

MinimockIsEmptyInspect logs each unmet expectation

func (*ExecutionRegistryMock) MinimockLengthDone

func (m *ExecutionRegistryMock) MinimockLengthDone() bool

MinimockLengthDone returns true if the count of the Length invocations corresponds the number of defined expectations

func (*ExecutionRegistryMock) MinimockLengthInspect

func (m *ExecutionRegistryMock) MinimockLengthInspect()

MinimockLengthInspect logs each unmet expectation

func (*ExecutionRegistryMock) MinimockOnPulseDone

func (m *ExecutionRegistryMock) MinimockOnPulseDone() bool

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

func (*ExecutionRegistryMock) MinimockOnPulseInspect

func (m *ExecutionRegistryMock) MinimockOnPulseInspect()

MinimockOnPulseInspect logs each unmet expectation

func (*ExecutionRegistryMock) MinimockRegisterDone

func (m *ExecutionRegistryMock) MinimockRegisterDone() bool

MinimockRegisterDone returns true if the count of the Register invocations corresponds the number of defined expectations

func (*ExecutionRegistryMock) MinimockRegisterInspect

func (m *ExecutionRegistryMock) MinimockRegisterInspect()

MinimockRegisterInspect logs each unmet expectation

func (*ExecutionRegistryMock) MinimockWait

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

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

func (*ExecutionRegistryMock) OnPulse

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

OnPulse implements ExecutionRegistry

func (*ExecutionRegistryMock) OnPulseAfterCounter

func (mmOnPulse *ExecutionRegistryMock) OnPulseAfterCounter() uint64

OnPulseAfterCounter returns a count of finished ExecutionRegistryMock.OnPulse invocations

func (*ExecutionRegistryMock) OnPulseBeforeCounter

func (mmOnPulse *ExecutionRegistryMock) OnPulseBeforeCounter() uint64

OnPulseBeforeCounter returns a count of ExecutionRegistryMock.OnPulse invocations

func (*ExecutionRegistryMock) Register

func (mmRegister *ExecutionRegistryMock) Register(ctx context.Context, transcript *common.Transcript) (err error)

Register implements ExecutionRegistry

func (*ExecutionRegistryMock) RegisterAfterCounter

func (mmRegister *ExecutionRegistryMock) RegisterAfterCounter() uint64

RegisterAfterCounter returns a count of finished ExecutionRegistryMock.Register invocations

func (*ExecutionRegistryMock) RegisterBeforeCounter

func (mmRegister *ExecutionRegistryMock) RegisterBeforeCounter() uint64

RegisterBeforeCounter returns a count of ExecutionRegistryMock.Register invocations

type ExecutionRegistryMockDoneExpectation

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

ExecutionRegistryMockDoneExpectation specifies expectation struct of the ExecutionRegistry.Done

func (*ExecutionRegistryMockDoneExpectation) Then

Then sets up ExecutionRegistry.Done return parameters for the expectation previously defined by the When method

type ExecutionRegistryMockDoneParams

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

ExecutionRegistryMockDoneParams contains parameters of the ExecutionRegistry.Done

type ExecutionRegistryMockDoneResults

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

ExecutionRegistryMockDoneResults contains results of the ExecutionRegistry.Done

type ExecutionRegistryMockGetActiveTranscriptExpectation

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

ExecutionRegistryMockGetActiveTranscriptExpectation specifies expectation struct of the ExecutionRegistry.GetActiveTranscript

func (*ExecutionRegistryMockGetActiveTranscriptExpectation) Then

Then sets up ExecutionRegistry.GetActiveTranscript return parameters for the expectation previously defined by the When method

type ExecutionRegistryMockGetActiveTranscriptParams

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

ExecutionRegistryMockGetActiveTranscriptParams contains parameters of the ExecutionRegistry.GetActiveTranscript

type ExecutionRegistryMockGetActiveTranscriptResults

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

ExecutionRegistryMockGetActiveTranscriptResults contains results of the ExecutionRegistry.GetActiveTranscript

type ExecutionRegistryMockIsEmptyExpectation

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

ExecutionRegistryMockIsEmptyExpectation specifies expectation struct of the ExecutionRegistry.IsEmpty

type ExecutionRegistryMockIsEmptyResults

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

ExecutionRegistryMockIsEmptyResults contains results of the ExecutionRegistry.IsEmpty

type ExecutionRegistryMockLengthExpectation

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

ExecutionRegistryMockLengthExpectation specifies expectation struct of the ExecutionRegistry.Length

type ExecutionRegistryMockLengthResults

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

ExecutionRegistryMockLengthResults contains results of the ExecutionRegistry.Length

type ExecutionRegistryMockOnPulseExpectation

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

ExecutionRegistryMockOnPulseExpectation specifies expectation struct of the ExecutionRegistry.OnPulse

func (*ExecutionRegistryMockOnPulseExpectation) Then

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

type ExecutionRegistryMockOnPulseParams

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

ExecutionRegistryMockOnPulseParams contains parameters of the ExecutionRegistry.OnPulse

type ExecutionRegistryMockOnPulseResults

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

ExecutionRegistryMockOnPulseResults contains results of the ExecutionRegistry.OnPulse

type ExecutionRegistryMockRegisterExpectation

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

ExecutionRegistryMockRegisterExpectation specifies expectation struct of the ExecutionRegistry.Register

func (*ExecutionRegistryMockRegisterExpectation) Then

Then sets up ExecutionRegistry.Register return parameters for the expectation previously defined by the When method

type ExecutionRegistryMockRegisterParams

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

ExecutionRegistryMockRegisterParams contains parameters of the ExecutionRegistry.Register

type ExecutionRegistryMockRegisterResults

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

ExecutionRegistryMockRegisterResults contains results of the ExecutionRegistry.Register

type Registry

type Registry interface {
	Register(transcript *common.Transcript)
}

Jump to

Keyboard shortcuts

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