chorus

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conductor

type Conductor interface {
	NodeStater

	// Set set's new pulse and closes current jet drop.
	CommitPulseChange(beat.Beat) error
	CommitFirstPulseChange(beat.Beat) error
}

Conductor provides methods to orchestrate pulses through application's components.

type ConductorMock

type ConductorMock struct {
	CancelNodeStateMock mConductorMockCancelNodeState

	CommitFirstPulseChangeMock mConductorMockCommitFirstPulseChange

	CommitPulseChangeMock mConductorMockCommitPulseChange

	RequestNodeStateMock mConductorMockRequestNodeState
	// contains filtered or unexported fields
}

ConductorMock implements Conductor

func NewConductorMock

func NewConductorMock(t minimock.Tester) *ConductorMock

NewConductorMock returns a mock for Conductor

func (*ConductorMock) CancelNodeState

func (mmCancelNodeState *ConductorMock) CancelNodeState()

CancelNodeState implements Conductor

func (*ConductorMock) CancelNodeStateAfterCounter

func (mmCancelNodeState *ConductorMock) CancelNodeStateAfterCounter() uint64

CancelNodeStateAfterCounter returns a count of finished ConductorMock.CancelNodeState invocations

func (*ConductorMock) CancelNodeStateBeforeCounter

func (mmCancelNodeState *ConductorMock) CancelNodeStateBeforeCounter() uint64

CancelNodeStateBeforeCounter returns a count of ConductorMock.CancelNodeState invocations

func (*ConductorMock) CommitFirstPulseChange

func (mmCommitFirstPulseChange *ConductorMock) CommitFirstPulseChange(b1 beat.Beat) (err error)

CommitFirstPulseChange implements Conductor

func (*ConductorMock) CommitFirstPulseChangeAfterCounter

func (mmCommitFirstPulseChange *ConductorMock) CommitFirstPulseChangeAfterCounter() uint64

CommitFirstPulseChangeAfterCounter returns a count of finished ConductorMock.CommitFirstPulseChange invocations

func (*ConductorMock) CommitFirstPulseChangeBeforeCounter

func (mmCommitFirstPulseChange *ConductorMock) CommitFirstPulseChangeBeforeCounter() uint64

CommitFirstPulseChangeBeforeCounter returns a count of ConductorMock.CommitFirstPulseChange invocations

func (*ConductorMock) CommitPulseChange

func (mmCommitPulseChange *ConductorMock) CommitPulseChange(b1 beat.Beat) (err error)

CommitPulseChange implements Conductor

func (*ConductorMock) CommitPulseChangeAfterCounter

func (mmCommitPulseChange *ConductorMock) CommitPulseChangeAfterCounter() uint64

CommitPulseChangeAfterCounter returns a count of finished ConductorMock.CommitPulseChange invocations

func (*ConductorMock) CommitPulseChangeBeforeCounter

func (mmCommitPulseChange *ConductorMock) CommitPulseChangeBeforeCounter() uint64

CommitPulseChangeBeforeCounter returns a count of ConductorMock.CommitPulseChange invocations

func (*ConductorMock) MinimockCancelNodeStateDone

func (m *ConductorMock) MinimockCancelNodeStateDone() bool

MinimockCancelNodeStateDone returns true if the count of the CancelNodeState invocations corresponds the number of defined expectations

func (*ConductorMock) MinimockCancelNodeStateInspect

func (m *ConductorMock) MinimockCancelNodeStateInspect()

MinimockCancelNodeStateInspect logs each unmet expectation

func (*ConductorMock) MinimockCommitFirstPulseChangeDone

func (m *ConductorMock) MinimockCommitFirstPulseChangeDone() bool

MinimockCommitFirstPulseChangeDone returns true if the count of the CommitFirstPulseChange invocations corresponds the number of defined expectations

func (*ConductorMock) MinimockCommitFirstPulseChangeInspect

func (m *ConductorMock) MinimockCommitFirstPulseChangeInspect()

MinimockCommitFirstPulseChangeInspect logs each unmet expectation

func (*ConductorMock) MinimockCommitPulseChangeDone

func (m *ConductorMock) MinimockCommitPulseChangeDone() bool

MinimockCommitPulseChangeDone returns true if the count of the CommitPulseChange invocations corresponds the number of defined expectations

func (*ConductorMock) MinimockCommitPulseChangeInspect

func (m *ConductorMock) MinimockCommitPulseChangeInspect()

MinimockCommitPulseChangeInspect logs each unmet expectation

func (*ConductorMock) MinimockFinish

func (m *ConductorMock) MinimockFinish()

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

func (*ConductorMock) MinimockRequestNodeStateDone

func (m *ConductorMock) MinimockRequestNodeStateDone() bool

MinimockRequestNodeStateDone returns true if the count of the RequestNodeState invocations corresponds the number of defined expectations

func (*ConductorMock) MinimockRequestNodeStateInspect

func (m *ConductorMock) MinimockRequestNodeStateInspect()

MinimockRequestNodeStateInspect logs each unmet expectation

func (*ConductorMock) MinimockWait

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

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

func (*ConductorMock) RequestNodeState

func (mmRequestNodeState *ConductorMock) RequestNodeState(n1 NodeStateFunc)

RequestNodeState implements Conductor

func (*ConductorMock) RequestNodeStateAfterCounter

func (mmRequestNodeState *ConductorMock) RequestNodeStateAfterCounter() uint64

RequestNodeStateAfterCounter returns a count of finished ConductorMock.RequestNodeState invocations

func (*ConductorMock) RequestNodeStateBeforeCounter

func (mmRequestNodeState *ConductorMock) RequestNodeStateBeforeCounter() uint64

RequestNodeStateBeforeCounter returns a count of ConductorMock.RequestNodeState invocations

type ConductorMockCancelNodeStateExpectation

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

ConductorMockCancelNodeStateExpectation specifies expectation struct of the Conductor.CancelNodeState

type ConductorMockCommitFirstPulseChangeExpectation

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

ConductorMockCommitFirstPulseChangeExpectation specifies expectation struct of the Conductor.CommitFirstPulseChange

func (*ConductorMockCommitFirstPulseChangeExpectation) Then

Then sets up Conductor.CommitFirstPulseChange return parameters for the expectation previously defined by the When method

type ConductorMockCommitFirstPulseChangeParams

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

ConductorMockCommitFirstPulseChangeParams contains parameters of the Conductor.CommitFirstPulseChange

type ConductorMockCommitFirstPulseChangeResults

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

ConductorMockCommitFirstPulseChangeResults contains results of the Conductor.CommitFirstPulseChange

type ConductorMockCommitPulseChangeExpectation

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

ConductorMockCommitPulseChangeExpectation specifies expectation struct of the Conductor.CommitPulseChange

func (*ConductorMockCommitPulseChangeExpectation) Then

Then sets up Conductor.CommitPulseChange return parameters for the expectation previously defined by the When method

type ConductorMockCommitPulseChangeParams

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

ConductorMockCommitPulseChangeParams contains parameters of the Conductor.CommitPulseChange

type ConductorMockCommitPulseChangeResults

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

ConductorMockCommitPulseChangeResults contains results of the Conductor.CommitPulseChange

type ConductorMockRequestNodeStateExpectation

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

ConductorMockRequestNodeStateExpectation specifies expectation struct of the Conductor.RequestNodeState

type ConductorMockRequestNodeStateParams

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

ConductorMockRequestNodeStateParams contains parameters of the Conductor.RequestNodeState

type NodeStateFunc

type NodeStateFunc = func(api.UpstreamState)

type NodeStater

type NodeStater interface {
	RequestNodeState(NodeStateFunc)
	CancelNodeState()
}

Jump to

Keyboard shortcuts

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