test

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCloudEventsClient

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

FakeCloudEventsClient is an implementation of a test CloudEvents client.

func NewTestClient

func NewTestClient() *FakeCloudEventsClient

NewTestClient returns a new instance of test client.

func (*FakeCloudEventsClient) IsReceiverReady

func (c *FakeCloudEventsClient) IsReceiverReady() bool

IsReceiverReady returns true if the dispatcher

func (*FakeCloudEventsClient) Request

Request is a mock method to send events.

func (*FakeCloudEventsClient) Reset

func (c *FakeCloudEventsClient) Reset()

Reset flushes events array.

func (*FakeCloudEventsClient) Send

Send is a mock method to send events.

func (*FakeCloudEventsClient) Sent

Sent returns the slice of events that were sent with test client.

func (*FakeCloudEventsClient) StartReceiver

func (c *FakeCloudEventsClient) StartReceiver(ctx context.Context, fn interface{}) error

StartReceiver is a mock method to start events receiver.

func (*FakeCloudEventsClient) WaitForReceiverReady

func (c *FakeCloudEventsClient) WaitForReceiverReady(wait time.Duration) error

WaitForReceiverReady will poll the client to check if the receiver dispatcher function is configured.

Jump to

Keyboard shortcuts

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