worker_mocks

package
v0.15.1-rc.7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockWorker

type MockWorker struct {
	ReceivedEvents   []*triggers2.Event
	ReceivedRequests []*triggers2.HttpRequest
	// contains filtered or unexported fields
}

MockWorker - A mock worker interface for testing

func NewMockWorker

func NewMockWorker(opts *MockWorkerOptions) *MockWorker

func (*MockWorker) HandleEvent

func (m *MockWorker) HandleEvent(trigger *triggers2.Event) error

func (*MockWorker) HandleHttpRequest

func (m *MockWorker) HandleHttpRequest(trigger *triggers2.HttpRequest) (*triggers2.HttpResponse, error)

func (*MockWorker) HandlesEvent added in v0.13.0

func (m *MockWorker) HandlesEvent(trigger *triggers2.Event) bool

func (*MockWorker) HandlesHttpRequest added in v0.13.0

func (m *MockWorker) HandlesHttpRequest(trigger *triggers2.HttpRequest) bool

func (*MockWorker) Reset

func (m *MockWorker) Reset()

type MockWorkerOptions

type MockWorkerOptions struct {
	ReturnHttp *triggers2.HttpResponse
	HttpError  error
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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