worker_mocks

package
v0.12.0-rc.19 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 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) 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