waiter

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 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 MockOption

type MockOption struct {
	mock.Mock
}

MockOption is an autogenerated mock type for the Option type

func NewMockOption

func NewMockOption(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockOption

NewMockOption creates a new instance of MockOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockOption) Execute

func (_m *MockOption) Execute(c *waiterCfg)

Execute provides a mock function with given fields: c

type MockWaitFunc

type MockWaitFunc struct {
	mock.Mock
}

MockWaitFunc is an autogenerated mock type for the WaitFunc type

func NewMockWaitFunc

func NewMockWaitFunc(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockWaitFunc

NewMockWaitFunc creates a new instance of MockWaitFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockWaitFunc) Execute

func (_m *MockWaitFunc) Execute(ctx context.Context) error

Execute provides a mock function with given fields: ctx

type MockWaiter

type MockWaiter struct {
	mock.Mock
}

MockWaiter is an autogenerated mock type for the Waiter type

func NewMockWaiter

func NewMockWaiter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockWaiter

NewMockWaiter creates a new instance of MockWaiter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockWaiter) Add

func (_m *MockWaiter) Add(fns ...WaitFunc)

Add provides a mock function with given fields: fns

func (*MockWaiter) CancelFunc

func (_m *MockWaiter) CancelFunc() context.CancelFunc

CancelFunc provides a mock function with given fields:

func (*MockWaiter) Context

func (_m *MockWaiter) Context() context.Context

Context provides a mock function with given fields:

func (*MockWaiter) Wait

func (_m *MockWaiter) Wait() error

Wait provides a mock function with given fields:

type Option

type Option func(c *waiterCfg)

func CatchSignals

func CatchSignals() Option

func ParentContext

func ParentContext(ctx context.Context) Option

type WaitFunc

type WaitFunc func(ctx context.Context) error

type Waiter

type Waiter interface {
	Add(fns ...WaitFunc)
	Wait() error
	Context() context.Context
	CancelFunc() context.CancelFunc
}

func New

func New(options ...Option) Waiter

Jump to

Keyboard shortcuts

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