Documentation ¶
Index ¶
- type MockWorker
- func (m *MockWorker) HandleEvent(trigger *triggers2.Event) error
- func (m *MockWorker) HandleHttpRequest(trigger *triggers2.HttpRequest) (*triggers2.HttpResponse, error)
- func (m *MockWorker) HandlesEvent(trigger *triggers2.Event) bool
- func (m *MockWorker) HandlesHttpRequest(trigger *triggers2.HttpRequest) bool
- func (m *MockWorker) Reset()
- type MockWorkerOptions
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 }
Click to show internal directories.
Click to hide internal directories.