mocks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FinalizerFinalizeFunc

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

FinalizerFinalizeFunc describes the behavior when the Finalize method of the parent MockFinalizer instance is invoked.

func (*FinalizerFinalizeFunc) History

History returns a sequence of FinalizerFinalizeFuncCall objects describing the invocations of this function.

func (*FinalizerFinalizeFunc) PushHook

func (f *FinalizerFinalizeFunc) PushHook(hook func() error)

PushHook adds a function to the end of hook queue. Each invocation of the Finalize method of the parent MockFinalizer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*FinalizerFinalizeFunc) PushReturn

func (f *FinalizerFinalizeFunc) PushReturn(r0 error)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*FinalizerFinalizeFunc) SetDefaultHook

func (f *FinalizerFinalizeFunc) SetDefaultHook(hook func() error)

SetDefaultHook sets function that is called when the Finalize method of the parent MockFinalizer instance is invoked and the hook queue is empty.

func (*FinalizerFinalizeFunc) SetDefaultReturn

func (f *FinalizerFinalizeFunc) SetDefaultReturn(r0 error)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type FinalizerFinalizeFuncCall

type FinalizerFinalizeFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 error
}

FinalizerFinalizeFuncCall is an object that describes an invocation of method Finalize on an instance of MockFinalizer.

func (FinalizerFinalizeFuncCall) Args

func (c FinalizerFinalizeFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (FinalizerFinalizeFuncCall) Results

func (c FinalizerFinalizeFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type InitializerInitFunc

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

InitializerInitFunc describes the behavior when the Init method of the parent MockInitializer instance is invoked.

func (*InitializerInitFunc) History

History returns a sequence of InitializerInitFuncCall objects describing the invocations of this function.

func (*InitializerInitFunc) PushHook

func (f *InitializerInitFunc) PushHook(hook func(config.Config) error)

PushHook adds a function to the end of hook queue. Each invocation of the Init method of the parent MockInitializer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*InitializerInitFunc) PushReturn

func (f *InitializerInitFunc) PushReturn(r0 error)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*InitializerInitFunc) SetDefaultHook

func (f *InitializerInitFunc) SetDefaultHook(hook func(config.Config) error)

SetDefaultHook sets function that is called when the Init method of the parent MockInitializer instance is invoked and the hook queue is empty.

func (*InitializerInitFunc) SetDefaultReturn

func (f *InitializerInitFunc) SetDefaultReturn(r0 error)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type InitializerInitFuncCall

type InitializerInitFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 config.Config
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 error
}

InitializerInitFuncCall is an object that describes an invocation of method Init on an instance of MockInitializer.

func (InitializerInitFuncCall) Args

func (c InitializerInitFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (InitializerInitFuncCall) Results

func (c InitializerInitFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type MockFinalizer

type MockFinalizer struct {
	// FinalizeFunc is an instance of a mock function object controlling the
	// behavior of the method Finalize.
	FinalizeFunc *FinalizerFinalizeFunc
}

MockFinalizer is a mock implementation of the Finalizer interface (from the package github.com/go-nacelle/process) used for unit testing.

func NewMockFinalizer

func NewMockFinalizer() *MockFinalizer

NewMockFinalizer creates a new mock of the Finalizer interface. All methods return zero values for all results, unless overwritten.

func NewMockFinalizerFrom

func NewMockFinalizerFrom(i process.Finalizer) *MockFinalizer

NewMockFinalizerFrom creates a new mock of the MockFinalizer interface. All methods delegate to the given implementation, unless overwritten.

func (*MockFinalizer) Finalize

func (m *MockFinalizer) Finalize() error

Finalize delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

type MockInitializer

type MockInitializer struct {
	// InitFunc is an instance of a mock function object controlling the
	// behavior of the method Init.
	InitFunc *InitializerInitFunc
}

MockInitializer is a mock implementation of the Initializer interface (from the package github.com/go-nacelle/process) used for unit testing.

func NewMockInitializer

func NewMockInitializer() *MockInitializer

NewMockInitializer creates a new mock of the Initializer interface. All methods return zero values for all results, unless overwritten.

func NewMockInitializerFrom

func NewMockInitializerFrom(i process.Initializer) *MockInitializer

NewMockInitializerFrom creates a new mock of the MockInitializer interface. All methods delegate to the given implementation, unless overwritten.

func (*MockInitializer) Init

func (m *MockInitializer) Init(v0 config.Config) error

Init delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

type MockProcess

type MockProcess struct {
	// InitFunc is an instance of a mock function object controlling the
	// behavior of the method Init.
	InitFunc *ProcessInitFunc
	// StartFunc is an instance of a mock function object controlling the
	// behavior of the method Start.
	StartFunc *ProcessStartFunc
	// StopFunc is an instance of a mock function object controlling the
	// behavior of the method Stop.
	StopFunc *ProcessStopFunc
}

MockProcess is a mock implementation of the Process interface (from the package github.com/go-nacelle/process) used for unit testing.

func NewMockProcess

func NewMockProcess() *MockProcess

NewMockProcess creates a new mock of the Process interface. All methods return zero values for all results, unless overwritten.

func NewMockProcessFrom

func NewMockProcessFrom(i process.Process) *MockProcess

NewMockProcessFrom creates a new mock of the MockProcess interface. All methods delegate to the given implementation, unless overwritten.

func (*MockProcess) Init

func (m *MockProcess) Init(v0 config.Config) error

Init delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcess) Start

func (m *MockProcess) Start() error

Start delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcess) Stop

func (m *MockProcess) Stop() error

Stop delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

type MockProcessContainer

type MockProcessContainer struct {
	// GetInitializersFunc is an instance of a mock function object
	// controlling the behavior of the method GetInitializers.
	GetInitializersFunc *ProcessContainerGetInitializersFunc
	// GetProcessesAtPriorityIndexFunc is an instance of a mock function
	// object controlling the behavior of the method
	// GetProcessesAtPriorityIndex.
	GetProcessesAtPriorityIndexFunc *ProcessContainerGetProcessesAtPriorityIndexFunc
	// NumInitializersFunc is an instance of a mock function object
	// controlling the behavior of the method NumInitializers.
	NumInitializersFunc *ProcessContainerNumInitializersFunc
	// NumPrioritiesFunc is an instance of a mock function object
	// controlling the behavior of the method NumPriorities.
	NumPrioritiesFunc *ProcessContainerNumPrioritiesFunc
	// NumProcessesFunc is an instance of a mock function object controlling
	// the behavior of the method NumProcesses.
	NumProcessesFunc *ProcessContainerNumProcessesFunc
	// RegisterInitializerFunc is an instance of a mock function object
	// controlling the behavior of the method RegisterInitializer.
	RegisterInitializerFunc *ProcessContainerRegisterInitializerFunc
	// RegisterProcessFunc is an instance of a mock function object
	// controlling the behavior of the method RegisterProcess.
	RegisterProcessFunc *ProcessContainerRegisterProcessFunc
}

MockProcessContainer is a mock implementation of the ProcessContainer interface (from the package github.com/go-nacelle/process) used for unit testing.

func NewMockProcessContainer

func NewMockProcessContainer() *MockProcessContainer

NewMockProcessContainer creates a new mock of the ProcessContainer interface. All methods return zero values for all results, unless overwritten.

func NewMockProcessContainerFrom

func NewMockProcessContainerFrom(i process.ProcessContainer) *MockProcessContainer

NewMockProcessContainerFrom creates a new mock of the MockProcessContainer interface. All methods delegate to the given implementation, unless overwritten.

func (*MockProcessContainer) GetInitializers

func (m *MockProcessContainer) GetInitializers() []*process.InitializerMeta

GetInitializers delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcessContainer) GetProcessesAtPriorityIndex

func (m *MockProcessContainer) GetProcessesAtPriorityIndex(v0 int) []*process.ProcessMeta

GetProcessesAtPriorityIndex delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcessContainer) NumInitializers

func (m *MockProcessContainer) NumInitializers() int

NumInitializers delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcessContainer) NumPriorities

func (m *MockProcessContainer) NumPriorities() int

NumPriorities delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcessContainer) NumProcesses

func (m *MockProcessContainer) NumProcesses() int

NumProcesses delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcessContainer) RegisterInitializer

func (m *MockProcessContainer) RegisterInitializer(v0 process.Initializer, v1 ...process.InitializerConfigFunc)

RegisterInitializer delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockProcessContainer) RegisterProcess

func (m *MockProcessContainer) RegisterProcess(v0 process.Process, v1 ...process.ProcessConfigFunc)

RegisterProcess delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

type MockRunner

type MockRunner struct {
	// RunFunc is an instance of a mock function object controlling the
	// behavior of the method Run.
	RunFunc *RunnerRunFunc
	// ShutdownFunc is an instance of a mock function object controlling the
	// behavior of the method Shutdown.
	ShutdownFunc *RunnerShutdownFunc
}

MockRunner is a mock implementation of the Runner interface (from the package github.com/go-nacelle/process) used for unit testing.

func NewMockRunner

func NewMockRunner() *MockRunner

NewMockRunner creates a new mock of the Runner interface. All methods return zero values for all results, unless overwritten.

func NewMockRunnerFrom

func NewMockRunnerFrom(i process.Runner) *MockRunner

NewMockRunnerFrom creates a new mock of the MockRunner interface. All methods delegate to the given implementation, unless overwritten.

func (*MockRunner) Run

func (m *MockRunner) Run(v0 config.Config) <-chan error

Run delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockRunner) Shutdown

func (m *MockRunner) Shutdown(v0 time.Duration) error

Shutdown delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

type ProcessContainerGetInitializersFunc

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

ProcessContainerGetInitializersFunc describes the behavior when the GetInitializers method of the parent MockProcessContainer instance is invoked.

func (*ProcessContainerGetInitializersFunc) History

History returns a sequence of ProcessContainerGetInitializersFuncCall objects describing the invocations of this function.

func (*ProcessContainerGetInitializersFunc) PushHook

func (f *ProcessContainerGetInitializersFunc) PushHook(hook func() []*process.InitializerMeta)

PushHook adds a function to the end of hook queue. Each invocation of the GetInitializers method of the parent MockProcessContainer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessContainerGetInitializersFunc) PushReturn

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessContainerGetInitializersFunc) SetDefaultHook

func (f *ProcessContainerGetInitializersFunc) SetDefaultHook(hook func() []*process.InitializerMeta)

SetDefaultHook sets function that is called when the GetInitializers method of the parent MockProcessContainer instance is invoked and the hook queue is empty.

func (*ProcessContainerGetInitializersFunc) SetDefaultReturn

func (f *ProcessContainerGetInitializersFunc) SetDefaultReturn(r0 []*process.InitializerMeta)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessContainerGetInitializersFuncCall

type ProcessContainerGetInitializersFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 []*process.InitializerMeta
}

ProcessContainerGetInitializersFuncCall is an object that describes an invocation of method GetInitializers on an instance of MockProcessContainer.

func (ProcessContainerGetInitializersFuncCall) Args

func (c ProcessContainerGetInitializersFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (ProcessContainerGetInitializersFuncCall) Results

func (c ProcessContainerGetInitializersFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessContainerGetProcessesAtPriorityIndexFunc

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

ProcessContainerGetProcessesAtPriorityIndexFunc describes the behavior when the GetProcessesAtPriorityIndex method of the parent MockProcessContainer instance is invoked.

func (*ProcessContainerGetProcessesAtPriorityIndexFunc) History

History returns a sequence of ProcessContainerGetProcessesAtPriorityIndexFuncCall objects describing the invocations of this function.

func (*ProcessContainerGetProcessesAtPriorityIndexFunc) PushHook

PushHook adds a function to the end of hook queue. Each invocation of the GetProcessesAtPriorityIndex method of the parent MockProcessContainer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessContainerGetProcessesAtPriorityIndexFunc) PushReturn

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessContainerGetProcessesAtPriorityIndexFunc) SetDefaultHook

SetDefaultHook sets function that is called when the GetProcessesAtPriorityIndex method of the parent MockProcessContainer instance is invoked and the hook queue is empty.

func (*ProcessContainerGetProcessesAtPriorityIndexFunc) SetDefaultReturn

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessContainerGetProcessesAtPriorityIndexFuncCall

type ProcessContainerGetProcessesAtPriorityIndexFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 int
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 []*process.ProcessMeta
}

ProcessContainerGetProcessesAtPriorityIndexFuncCall is an object that describes an invocation of method GetProcessesAtPriorityIndex on an instance of MockProcessContainer.

func (ProcessContainerGetProcessesAtPriorityIndexFuncCall) Args

Args returns an interface slice containing the arguments of this invocation.

func (ProcessContainerGetProcessesAtPriorityIndexFuncCall) Results

func (c ProcessContainerGetProcessesAtPriorityIndexFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessContainerNumInitializersFunc

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

ProcessContainerNumInitializersFunc describes the behavior when the NumInitializers method of the parent MockProcessContainer instance is invoked.

func (*ProcessContainerNumInitializersFunc) History

History returns a sequence of ProcessContainerNumInitializersFuncCall objects describing the invocations of this function.

func (*ProcessContainerNumInitializersFunc) PushHook

func (f *ProcessContainerNumInitializersFunc) PushHook(hook func() int)

PushHook adds a function to the end of hook queue. Each invocation of the NumInitializers method of the parent MockProcessContainer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessContainerNumInitializersFunc) PushReturn

func (f *ProcessContainerNumInitializersFunc) PushReturn(r0 int)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessContainerNumInitializersFunc) SetDefaultHook

func (f *ProcessContainerNumInitializersFunc) SetDefaultHook(hook func() int)

SetDefaultHook sets function that is called when the NumInitializers method of the parent MockProcessContainer instance is invoked and the hook queue is empty.

func (*ProcessContainerNumInitializersFunc) SetDefaultReturn

func (f *ProcessContainerNumInitializersFunc) SetDefaultReturn(r0 int)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessContainerNumInitializersFuncCall

type ProcessContainerNumInitializersFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 int
}

ProcessContainerNumInitializersFuncCall is an object that describes an invocation of method NumInitializers on an instance of MockProcessContainer.

func (ProcessContainerNumInitializersFuncCall) Args

func (c ProcessContainerNumInitializersFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (ProcessContainerNumInitializersFuncCall) Results

func (c ProcessContainerNumInitializersFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessContainerNumPrioritiesFunc

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

ProcessContainerNumPrioritiesFunc describes the behavior when the NumPriorities method of the parent MockProcessContainer instance is invoked.

func (*ProcessContainerNumPrioritiesFunc) History

History returns a sequence of ProcessContainerNumPrioritiesFuncCall objects describing the invocations of this function.

func (*ProcessContainerNumPrioritiesFunc) PushHook

func (f *ProcessContainerNumPrioritiesFunc) PushHook(hook func() int)

PushHook adds a function to the end of hook queue. Each invocation of the NumPriorities method of the parent MockProcessContainer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessContainerNumPrioritiesFunc) PushReturn

func (f *ProcessContainerNumPrioritiesFunc) PushReturn(r0 int)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessContainerNumPrioritiesFunc) SetDefaultHook

func (f *ProcessContainerNumPrioritiesFunc) SetDefaultHook(hook func() int)

SetDefaultHook sets function that is called when the NumPriorities method of the parent MockProcessContainer instance is invoked and the hook queue is empty.

func (*ProcessContainerNumPrioritiesFunc) SetDefaultReturn

func (f *ProcessContainerNumPrioritiesFunc) SetDefaultReturn(r0 int)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessContainerNumPrioritiesFuncCall

type ProcessContainerNumPrioritiesFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 int
}

ProcessContainerNumPrioritiesFuncCall is an object that describes an invocation of method NumPriorities on an instance of MockProcessContainer.

func (ProcessContainerNumPrioritiesFuncCall) Args

func (c ProcessContainerNumPrioritiesFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (ProcessContainerNumPrioritiesFuncCall) Results

func (c ProcessContainerNumPrioritiesFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessContainerNumProcessesFunc

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

ProcessContainerNumProcessesFunc describes the behavior when the NumProcesses method of the parent MockProcessContainer instance is invoked.

func (*ProcessContainerNumProcessesFunc) History

History returns a sequence of ProcessContainerNumProcessesFuncCall objects describing the invocations of this function.

func (*ProcessContainerNumProcessesFunc) PushHook

func (f *ProcessContainerNumProcessesFunc) PushHook(hook func() int)

PushHook adds a function to the end of hook queue. Each invocation of the NumProcesses method of the parent MockProcessContainer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessContainerNumProcessesFunc) PushReturn

func (f *ProcessContainerNumProcessesFunc) PushReturn(r0 int)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessContainerNumProcessesFunc) SetDefaultHook

func (f *ProcessContainerNumProcessesFunc) SetDefaultHook(hook func() int)

SetDefaultHook sets function that is called when the NumProcesses method of the parent MockProcessContainer instance is invoked and the hook queue is empty.

func (*ProcessContainerNumProcessesFunc) SetDefaultReturn

func (f *ProcessContainerNumProcessesFunc) SetDefaultReturn(r0 int)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessContainerNumProcessesFuncCall

type ProcessContainerNumProcessesFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 int
}

ProcessContainerNumProcessesFuncCall is an object that describes an invocation of method NumProcesses on an instance of MockProcessContainer.

func (ProcessContainerNumProcessesFuncCall) Args

func (c ProcessContainerNumProcessesFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (ProcessContainerNumProcessesFuncCall) Results

func (c ProcessContainerNumProcessesFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessContainerRegisterInitializerFunc

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

ProcessContainerRegisterInitializerFunc describes the behavior when the RegisterInitializer method of the parent MockProcessContainer instance is invoked.

func (*ProcessContainerRegisterInitializerFunc) History

History returns a sequence of ProcessContainerRegisterInitializerFuncCall objects describing the invocations of this function.

func (*ProcessContainerRegisterInitializerFunc) PushHook

PushHook adds a function to the end of hook queue. Each invocation of the RegisterInitializer method of the parent MockProcessContainer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessContainerRegisterInitializerFunc) PushReturn

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessContainerRegisterInitializerFunc) SetDefaultHook

SetDefaultHook sets function that is called when the RegisterInitializer method of the parent MockProcessContainer instance is invoked and the hook queue is empty.

func (*ProcessContainerRegisterInitializerFunc) SetDefaultReturn

func (f *ProcessContainerRegisterInitializerFunc) SetDefaultReturn()

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessContainerRegisterInitializerFuncCall

type ProcessContainerRegisterInitializerFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 process.Initializer
	// Arg1 is a slice containing the values of the variadic arguments
	// passed to this method invocation.
	Arg1 []process.InitializerConfigFunc
}

ProcessContainerRegisterInitializerFuncCall is an object that describes an invocation of method RegisterInitializer on an instance of MockProcessContainer.

func (ProcessContainerRegisterInitializerFuncCall) Args

func (c ProcessContainerRegisterInitializerFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.

func (ProcessContainerRegisterInitializerFuncCall) Results

func (c ProcessContainerRegisterInitializerFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessContainerRegisterProcessFunc

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

ProcessContainerRegisterProcessFunc describes the behavior when the RegisterProcess method of the parent MockProcessContainer instance is invoked.

func (*ProcessContainerRegisterProcessFunc) History

History returns a sequence of ProcessContainerRegisterProcessFuncCall objects describing the invocations of this function.

func (*ProcessContainerRegisterProcessFunc) PushHook

PushHook adds a function to the end of hook queue. Each invocation of the RegisterProcess method of the parent MockProcessContainer instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessContainerRegisterProcessFunc) PushReturn

func (f *ProcessContainerRegisterProcessFunc) PushReturn()

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessContainerRegisterProcessFunc) SetDefaultHook

SetDefaultHook sets function that is called when the RegisterProcess method of the parent MockProcessContainer instance is invoked and the hook queue is empty.

func (*ProcessContainerRegisterProcessFunc) SetDefaultReturn

func (f *ProcessContainerRegisterProcessFunc) SetDefaultReturn()

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessContainerRegisterProcessFuncCall

type ProcessContainerRegisterProcessFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 process.Process
	// Arg1 is a slice containing the values of the variadic arguments
	// passed to this method invocation.
	Arg1 []process.ProcessConfigFunc
}

ProcessContainerRegisterProcessFuncCall is an object that describes an invocation of method RegisterProcess on an instance of MockProcessContainer.

func (ProcessContainerRegisterProcessFuncCall) Args

func (c ProcessContainerRegisterProcessFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.

func (ProcessContainerRegisterProcessFuncCall) Results

func (c ProcessContainerRegisterProcessFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessInitFunc

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

ProcessInitFunc describes the behavior when the Init method of the parent MockProcess instance is invoked.

func (*ProcessInitFunc) History

func (f *ProcessInitFunc) History() []ProcessInitFuncCall

History returns a sequence of ProcessInitFuncCall objects describing the invocations of this function.

func (*ProcessInitFunc) PushHook

func (f *ProcessInitFunc) PushHook(hook func(config.Config) error)

PushHook adds a function to the end of hook queue. Each invocation of the Init method of the parent MockProcess instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessInitFunc) PushReturn

func (f *ProcessInitFunc) PushReturn(r0 error)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessInitFunc) SetDefaultHook

func (f *ProcessInitFunc) SetDefaultHook(hook func(config.Config) error)

SetDefaultHook sets function that is called when the Init method of the parent MockProcess instance is invoked and the hook queue is empty.

func (*ProcessInitFunc) SetDefaultReturn

func (f *ProcessInitFunc) SetDefaultReturn(r0 error)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessInitFuncCall

type ProcessInitFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 config.Config
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 error
}

ProcessInitFuncCall is an object that describes an invocation of method Init on an instance of MockProcess.

func (ProcessInitFuncCall) Args

func (c ProcessInitFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (ProcessInitFuncCall) Results

func (c ProcessInitFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessStartFunc

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

ProcessStartFunc describes the behavior when the Start method of the parent MockProcess instance is invoked.

func (*ProcessStartFunc) History

func (f *ProcessStartFunc) History() []ProcessStartFuncCall

History returns a sequence of ProcessStartFuncCall objects describing the invocations of this function.

func (*ProcessStartFunc) PushHook

func (f *ProcessStartFunc) PushHook(hook func() error)

PushHook adds a function to the end of hook queue. Each invocation of the Start method of the parent MockProcess instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessStartFunc) PushReturn

func (f *ProcessStartFunc) PushReturn(r0 error)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessStartFunc) SetDefaultHook

func (f *ProcessStartFunc) SetDefaultHook(hook func() error)

SetDefaultHook sets function that is called when the Start method of the parent MockProcess instance is invoked and the hook queue is empty.

func (*ProcessStartFunc) SetDefaultReturn

func (f *ProcessStartFunc) SetDefaultReturn(r0 error)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessStartFuncCall

type ProcessStartFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 error
}

ProcessStartFuncCall is an object that describes an invocation of method Start on an instance of MockProcess.

func (ProcessStartFuncCall) Args

func (c ProcessStartFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (ProcessStartFuncCall) Results

func (c ProcessStartFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type ProcessStopFunc

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

ProcessStopFunc describes the behavior when the Stop method of the parent MockProcess instance is invoked.

func (*ProcessStopFunc) History

func (f *ProcessStopFunc) History() []ProcessStopFuncCall

History returns a sequence of ProcessStopFuncCall objects describing the invocations of this function.

func (*ProcessStopFunc) PushHook

func (f *ProcessStopFunc) PushHook(hook func() error)

PushHook adds a function to the end of hook queue. Each invocation of the Stop method of the parent MockProcess instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*ProcessStopFunc) PushReturn

func (f *ProcessStopFunc) PushReturn(r0 error)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*ProcessStopFunc) SetDefaultHook

func (f *ProcessStopFunc) SetDefaultHook(hook func() error)

SetDefaultHook sets function that is called when the Stop method of the parent MockProcess instance is invoked and the hook queue is empty.

func (*ProcessStopFunc) SetDefaultReturn

func (f *ProcessStopFunc) SetDefaultReturn(r0 error)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type ProcessStopFuncCall

type ProcessStopFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 error
}

ProcessStopFuncCall is an object that describes an invocation of method Stop on an instance of MockProcess.

func (ProcessStopFuncCall) Args

func (c ProcessStopFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (ProcessStopFuncCall) Results

func (c ProcessStopFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type RunnerRunFunc

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

RunnerRunFunc describes the behavior when the Run method of the parent MockRunner instance is invoked.

func (*RunnerRunFunc) History

func (f *RunnerRunFunc) History() []RunnerRunFuncCall

History returns a sequence of RunnerRunFuncCall objects describing the invocations of this function.

func (*RunnerRunFunc) PushHook

func (f *RunnerRunFunc) PushHook(hook func(config.Config) <-chan error)

PushHook adds a function to the end of hook queue. Each invocation of the Run method of the parent MockRunner instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*RunnerRunFunc) PushReturn

func (f *RunnerRunFunc) PushReturn(r0 <-chan error)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*RunnerRunFunc) SetDefaultHook

func (f *RunnerRunFunc) SetDefaultHook(hook func(config.Config) <-chan error)

SetDefaultHook sets function that is called when the Run method of the parent MockRunner instance is invoked and the hook queue is empty.

func (*RunnerRunFunc) SetDefaultReturn

func (f *RunnerRunFunc) SetDefaultReturn(r0 <-chan error)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type RunnerRunFuncCall

type RunnerRunFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 config.Config
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 <-chan error
}

RunnerRunFuncCall is an object that describes an invocation of method Run on an instance of MockRunner.

func (RunnerRunFuncCall) Args

func (c RunnerRunFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (RunnerRunFuncCall) Results

func (c RunnerRunFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type RunnerShutdownFunc

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

RunnerShutdownFunc describes the behavior when the Shutdown method of the parent MockRunner instance is invoked.

func (*RunnerShutdownFunc) History

History returns a sequence of RunnerShutdownFuncCall objects describing the invocations of this function.

func (*RunnerShutdownFunc) PushHook

func (f *RunnerShutdownFunc) PushHook(hook func(time.Duration) error)

PushHook adds a function to the end of hook queue. Each invocation of the Shutdown method of the parent MockRunner instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*RunnerShutdownFunc) PushReturn

func (f *RunnerShutdownFunc) PushReturn(r0 error)

PushReturn calls PushDefaultHook with a function that returns the given values.

func (*RunnerShutdownFunc) SetDefaultHook

func (f *RunnerShutdownFunc) SetDefaultHook(hook func(time.Duration) error)

SetDefaultHook sets function that is called when the Shutdown method of the parent MockRunner instance is invoked and the hook queue is empty.

func (*RunnerShutdownFunc) SetDefaultReturn

func (f *RunnerShutdownFunc) SetDefaultReturn(r0 error)

SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.

type RunnerShutdownFuncCall

type RunnerShutdownFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 time.Duration
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 error
}

RunnerShutdownFuncCall is an object that describes an invocation of method Shutdown on an instance of MockRunner.

func (RunnerShutdownFuncCall) Args

func (c RunnerShutdownFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (RunnerShutdownFuncCall) Results

func (c RunnerShutdownFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

Jump to

Keyboard shortcuts

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