shutdown

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

type Flag interface {
	Stop(ctx context.Context) func()
	Done(ctx context.Context, isDone func() bool)

	IsStopped() bool
}

func NewFlag

func NewFlag() Flag

type FlagMock

type FlagMock struct {
	DoneMock mFlagMockDone

	IsStoppedMock mFlagMockIsStopped

	StopMock mFlagMockStop
	// contains filtered or unexported fields
}

FlagMock implements Flag

func NewFlagMock

func NewFlagMock(t minimock.Tester) *FlagMock

NewFlagMock returns a mock for Flag

func (*FlagMock) Done

func (mmDone *FlagMock) Done(ctx context.Context, isDone func() bool)

Done implements Flag

func (*FlagMock) DoneAfterCounter

func (mmDone *FlagMock) DoneAfterCounter() uint64

DoneAfterCounter returns a count of finished FlagMock.Done invocations

func (*FlagMock) DoneBeforeCounter

func (mmDone *FlagMock) DoneBeforeCounter() uint64

DoneBeforeCounter returns a count of FlagMock.Done invocations

func (*FlagMock) IsStopped

func (mmIsStopped *FlagMock) IsStopped() (b1 bool)

IsStopped implements Flag

func (*FlagMock) IsStoppedAfterCounter

func (mmIsStopped *FlagMock) IsStoppedAfterCounter() uint64

IsStoppedAfterCounter returns a count of finished FlagMock.IsStopped invocations

func (*FlagMock) IsStoppedBeforeCounter

func (mmIsStopped *FlagMock) IsStoppedBeforeCounter() uint64

IsStoppedBeforeCounter returns a count of FlagMock.IsStopped invocations

func (*FlagMock) MinimockDoneDone

func (m *FlagMock) MinimockDoneDone() bool

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

func (*FlagMock) MinimockDoneInspect

func (m *FlagMock) MinimockDoneInspect()

MinimockDoneInspect logs each unmet expectation

func (*FlagMock) MinimockFinish

func (m *FlagMock) MinimockFinish()

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

func (*FlagMock) MinimockIsStoppedDone

func (m *FlagMock) MinimockIsStoppedDone() bool

MinimockIsStoppedDone returns true if the count of the IsStopped invocations corresponds the number of defined expectations

func (*FlagMock) MinimockIsStoppedInspect

func (m *FlagMock) MinimockIsStoppedInspect()

MinimockIsStoppedInspect logs each unmet expectation

func (*FlagMock) MinimockStopDone

func (m *FlagMock) MinimockStopDone() bool

MinimockStopDone returns true if the count of the Stop invocations corresponds the number of defined expectations

func (*FlagMock) MinimockStopInspect

func (m *FlagMock) MinimockStopInspect()

MinimockStopInspect logs each unmet expectation

func (*FlagMock) MinimockWait

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

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

func (*FlagMock) Stop

func (mmStop *FlagMock) Stop(ctx context.Context) (f1 func())

Stop implements Flag

func (*FlagMock) StopAfterCounter

func (mmStop *FlagMock) StopAfterCounter() uint64

StopAfterCounter returns a count of finished FlagMock.Stop invocations

func (*FlagMock) StopBeforeCounter

func (mmStop *FlagMock) StopBeforeCounter() uint64

StopBeforeCounter returns a count of FlagMock.Stop invocations

type FlagMockDoneExpectation

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

FlagMockDoneExpectation specifies expectation struct of the Flag.Done

type FlagMockDoneParams

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

FlagMockDoneParams contains parameters of the Flag.Done

type FlagMockIsStoppedExpectation

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

FlagMockIsStoppedExpectation specifies expectation struct of the Flag.IsStopped

type FlagMockIsStoppedResults

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

FlagMockIsStoppedResults contains results of the Flag.IsStopped

type FlagMockStopExpectation

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

FlagMockStopExpectation specifies expectation struct of the Flag.Stop

func (*FlagMockStopExpectation) Then

func (e *FlagMockStopExpectation) Then(f1 func()) *FlagMock

Then sets up Flag.Stop return parameters for the expectation previously defined by the When method

type FlagMockStopParams

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

FlagMockStopParams contains parameters of the Flag.Stop

type FlagMockStopResults

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

FlagMockStopResults contains results of the Flag.Stop

Jump to

Keyboard shortcuts

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