dispatcher

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	BeginPulse(ctx context.Context, pulse insolar.Pulse)
	ClosePulse(ctx context.Context, pulse insolar.Pulse)
	Process(msg *message.Message) error
}

func NewDispatcher

func NewDispatcher(pulseAccessor insPulse.Accessor, present flow.MakeHandle, future flow.MakeHandle, past flow.MakeHandle) Dispatcher

type DispatcherMock

type DispatcherMock struct {
	BeginPulseMock mDispatcherMockBeginPulse

	ClosePulseMock mDispatcherMockClosePulse

	ProcessMock mDispatcherMockProcess
	// contains filtered or unexported fields
}

DispatcherMock implements Dispatcher

func NewDispatcherMock

func NewDispatcherMock(t minimock.Tester) *DispatcherMock

NewDispatcherMock returns a mock for Dispatcher

func (*DispatcherMock) BeginPulse

func (mmBeginPulse *DispatcherMock) BeginPulse(ctx context.Context, pulse insolar.Pulse)

BeginPulse implements Dispatcher

func (*DispatcherMock) BeginPulseAfterCounter

func (mmBeginPulse *DispatcherMock) BeginPulseAfterCounter() uint64

BeginPulseAfterCounter returns a count of finished DispatcherMock.BeginPulse invocations

func (*DispatcherMock) BeginPulseBeforeCounter

func (mmBeginPulse *DispatcherMock) BeginPulseBeforeCounter() uint64

BeginPulseBeforeCounter returns a count of DispatcherMock.BeginPulse invocations

func (*DispatcherMock) ClosePulse

func (mmClosePulse *DispatcherMock) ClosePulse(ctx context.Context, pulse insolar.Pulse)

ClosePulse implements Dispatcher

func (*DispatcherMock) ClosePulseAfterCounter

func (mmClosePulse *DispatcherMock) ClosePulseAfterCounter() uint64

ClosePulseAfterCounter returns a count of finished DispatcherMock.ClosePulse invocations

func (*DispatcherMock) ClosePulseBeforeCounter

func (mmClosePulse *DispatcherMock) ClosePulseBeforeCounter() uint64

ClosePulseBeforeCounter returns a count of DispatcherMock.ClosePulse invocations

func (*DispatcherMock) MinimockBeginPulseDone

func (m *DispatcherMock) MinimockBeginPulseDone() bool

MinimockBeginPulseDone returns true if the count of the BeginPulse invocations corresponds the number of defined expectations

func (*DispatcherMock) MinimockBeginPulseInspect

func (m *DispatcherMock) MinimockBeginPulseInspect()

MinimockBeginPulseInspect logs each unmet expectation

func (*DispatcherMock) MinimockClosePulseDone

func (m *DispatcherMock) MinimockClosePulseDone() bool

MinimockClosePulseDone returns true if the count of the ClosePulse invocations corresponds the number of defined expectations

func (*DispatcherMock) MinimockClosePulseInspect

func (m *DispatcherMock) MinimockClosePulseInspect()

MinimockClosePulseInspect logs each unmet expectation

func (*DispatcherMock) MinimockFinish

func (m *DispatcherMock) MinimockFinish()

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

func (*DispatcherMock) MinimockProcessDone

func (m *DispatcherMock) MinimockProcessDone() bool

MinimockProcessDone returns true if the count of the Process invocations corresponds the number of defined expectations

func (*DispatcherMock) MinimockProcessInspect

func (m *DispatcherMock) MinimockProcessInspect()

MinimockProcessInspect logs each unmet expectation

func (*DispatcherMock) MinimockWait

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

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

func (*DispatcherMock) Process

func (mmProcess *DispatcherMock) Process(msg *message.Message) (err error)

Process implements Dispatcher

func (*DispatcherMock) ProcessAfterCounter

func (mmProcess *DispatcherMock) ProcessAfterCounter() uint64

ProcessAfterCounter returns a count of finished DispatcherMock.Process invocations

func (*DispatcherMock) ProcessBeforeCounter

func (mmProcess *DispatcherMock) ProcessBeforeCounter() uint64

ProcessBeforeCounter returns a count of DispatcherMock.Process invocations

type DispatcherMockBeginPulseExpectation

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

DispatcherMockBeginPulseExpectation specifies expectation struct of the Dispatcher.BeginPulse

type DispatcherMockBeginPulseParams

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

DispatcherMockBeginPulseParams contains parameters of the Dispatcher.BeginPulse

type DispatcherMockClosePulseExpectation

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

DispatcherMockClosePulseExpectation specifies expectation struct of the Dispatcher.ClosePulse

type DispatcherMockClosePulseParams

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

DispatcherMockClosePulseParams contains parameters of the Dispatcher.ClosePulse

type DispatcherMockProcessExpectation

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

DispatcherMockProcessExpectation specifies expectation struct of the Dispatcher.Process

func (*DispatcherMockProcessExpectation) Then

Then sets up Dispatcher.Process return parameters for the expectation previously defined by the When method

type DispatcherMockProcessParams

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

DispatcherMockProcessParams contains parameters of the Dispatcher.Process

type DispatcherMockProcessResults

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

DispatcherMockProcessResults contains results of the Dispatcher.Process

Jump to

Keyboard shortcuts

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