client

package
v0.0.0-...-7613b02 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) Cancel

func (c *Client) Cancel(ctx context.Context, taskId string) error

func (*Client) Enqueue

func (c *Client) Enqueue(task queue.Task) (uuid.UUID, error)

TODO propgate context to enqueue

type MockTaskClient

type MockTaskClient struct {
	mock.Mock
}

MockTaskClient is an autogenerated mock type for the TaskClient type

func NewMockTaskClient

func NewMockTaskClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTaskClient

NewMockTaskClient creates a new instance of MockTaskClient. 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 (*MockTaskClient) Cancel

func (_m *MockTaskClient) Cancel(ctx context.Context, taskId string) error

Cancel provides a mock function with given fields: ctx, taskId

func (*MockTaskClient) Enqueue

func (_m *MockTaskClient) Enqueue(task queue.Task) (uuid.UUID, error)

Enqueue provides a mock function with given fields: task

type TaskClient

type TaskClient interface {
	Enqueue(task queue.Task) (uuid.UUID, error)
	Cancel(ctx context.Context, taskId string) error
}

func NewTaskClient

func NewTaskClient(q queue.Queue) TaskClient

Jump to

Keyboard shortcuts

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