client

package
v0.0.0-...-86b6e43 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 5 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) Enqueue

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

TODO propgate context to enqueue

func (*Client) SendCancelNotification

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

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) Enqueue

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

Enqueue provides a mock function with given fields: task

func (*MockTaskClient) SendCancelNotification

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

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

type TaskClient

type TaskClient interface {
	Enqueue(task queue.Task) (uuid.UUID, error)
	SendCancelNotification(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