Documentation ¶
Overview ¶
Package watchers is a generated GoMock package.
Package watchers is a generated GoMock package.
Package watchers is a generated GoMock package.
Index ¶
- type InvalidTrigger
- type MockRuleWatcher
- type MockRuleWatcherFactory
- type MockRuleWatcherFactoryMockRecorder
- type MockRuleWatcherMockRecorder
- type MockTriggerWatcher
- type MockTriggerWatcherFactory
- type MockTriggerWatcherFactoryMockRecorder
- type MockTriggerWatcherMockRecorder
- type RuleWatcher
- type RuleWatcherFactory
- type TriggerEvent
- type TriggerWatcher
- type TriggerWatcherFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvalidTrigger ¶
type InvalidTrigger struct {
Err error
}
InvalidTrigger describe an error returned when the trigger is invalid
func (InvalidTrigger) Error ¶
func (e InvalidTrigger) Error() string
type MockRuleWatcher ¶
type MockRuleWatcher struct {
// contains filtered or unexported fields
}
MockRuleWatcher is a mock of RuleWatcher interface
func NewMockRuleWatcher ¶
func NewMockRuleWatcher(ctrl *gomock.Controller) *MockRuleWatcher
NewMockRuleWatcher creates a new mock instance
func (*MockRuleWatcher) EXPECT ¶
func (m *MockRuleWatcher) EXPECT() *MockRuleWatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRuleWatcher) Start ¶
func (m *MockRuleWatcher) Start(arg0 context.Context)
Start mocks base method
type MockRuleWatcherFactory ¶
type MockRuleWatcherFactory struct {
// contains filtered or unexported fields
}
MockRuleWatcherFactory is a mock of RuleWatcherFactory interface
func NewMockRuleWatcherFactory ¶
func NewMockRuleWatcherFactory(ctrl *gomock.Controller) *MockRuleWatcherFactory
NewMockRuleWatcherFactory creates a new mock instance
func (*MockRuleWatcherFactory) Create ¶
func (m *MockRuleWatcherFactory) Create(arg0 models.Rule) RuleWatcher
Create mocks base method
func (*MockRuleWatcherFactory) EXPECT ¶
func (m *MockRuleWatcherFactory) EXPECT() *MockRuleWatcherFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockRuleWatcherFactoryMockRecorder ¶
type MockRuleWatcherFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRuleWatcherFactoryMockRecorder is the mock recorder for MockRuleWatcherFactory
func (*MockRuleWatcherFactoryMockRecorder) Create ¶
func (mr *MockRuleWatcherFactoryMockRecorder) Create(arg0 interface{}) *gomock.Call
Create indicates an expected call of Create
type MockRuleWatcherMockRecorder ¶
type MockRuleWatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockRuleWatcherMockRecorder is the mock recorder for MockRuleWatcher
func (*MockRuleWatcherMockRecorder) Start ¶
func (mr *MockRuleWatcherMockRecorder) Start(arg0 interface{}) *gomock.Call
Start indicates an expected call of Start
type MockTriggerWatcher ¶
type MockTriggerWatcher struct {
// contains filtered or unexported fields
}
MockTriggerWatcher is a mock of TriggerWatcher interface
func NewMockTriggerWatcher ¶
func NewMockTriggerWatcher(ctrl *gomock.Controller) *MockTriggerWatcher
NewMockTriggerWatcher creates a new mock instance
func (*MockTriggerWatcher) EXPECT ¶
func (m *MockTriggerWatcher) EXPECT() *MockTriggerWatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTriggerWatcher) Start ¶
func (m *MockTriggerWatcher) Start(arg0 context.Context)
Start mocks base method
func (*MockTriggerWatcher) UpdateLastExecuted ¶
func (m *MockTriggerWatcher) UpdateLastExecuted(arg0 time.Time) error
UpdateLastExecuted mocks base method
type MockTriggerWatcherFactory ¶
type MockTriggerWatcherFactory struct {
// contains filtered or unexported fields
}
MockTriggerWatcherFactory is a mock of TriggerWatcherFactory interface
func NewMockTriggerWatcherFactory ¶
func NewMockTriggerWatcherFactory(ctrl *gomock.Controller) *MockTriggerWatcherFactory
NewMockTriggerWatcherFactory creates a new mock instance
func (*MockTriggerWatcherFactory) Create ¶
func (m *MockTriggerWatcherFactory) Create(arg0 models.Trigger, arg1 []models.Target, arg2 time.Time, arg3 chan<- TriggerEvent, arg4 chan<- error) (TriggerWatcher, error)
Create mocks base method
func (*MockTriggerWatcherFactory) EXPECT ¶
func (m *MockTriggerWatcherFactory) EXPECT() *MockTriggerWatcherFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockTriggerWatcherFactoryMockRecorder ¶
type MockTriggerWatcherFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockTriggerWatcherFactoryMockRecorder is the mock recorder for MockTriggerWatcherFactory
func (*MockTriggerWatcherFactoryMockRecorder) Create ¶
func (mr *MockTriggerWatcherFactoryMockRecorder) Create(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
Create indicates an expected call of Create
type MockTriggerWatcherMockRecorder ¶
type MockTriggerWatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockTriggerWatcherMockRecorder is the mock recorder for MockTriggerWatcher
func (*MockTriggerWatcherMockRecorder) Start ¶
func (mr *MockTriggerWatcherMockRecorder) Start(arg0 interface{}) *gomock.Call
Start indicates an expected call of Start
func (*MockTriggerWatcherMockRecorder) UpdateLastExecuted ¶
func (mr *MockTriggerWatcherMockRecorder) UpdateLastExecuted(arg0 interface{}) *gomock.Call
UpdateLastExecuted indicates an expected call of UpdateLastExecuted
type RuleWatcher ¶
RuleWatcher defines methods to implement a rule watcher. It is responsible of monitoring the rule trigger(s), and execute the rule action when the trigger conditions are met.
type RuleWatcherFactory ¶
type RuleWatcherFactory interface {
Create(models.Rule) RuleWatcher
}
RuleWatcherFactory allows to create RuleWatchers
func NewRuleWatcherFactory ¶
func NewRuleWatcherFactory( ruleWriter services.RuleWriter, triggerWatcherFactory TriggerWatcherFactory, actionFactory actions.ActionFactory, errorChan chan<- error, logger log.FieldLogger, ) RuleWatcherFactory
NewRuleWatcherFactory creates a new RuleWatcherFactory
type TriggerEvent ¶
TriggerEvent holds values transmitted when a trigger trigger
type TriggerWatcher ¶
TriggerWatcher defines an interface for types watching on a trigger
type TriggerWatcherFactory ¶
type TriggerWatcherFactory interface { Create( trigger models.Trigger, targets []models.Target, lastExecuted time.Time, triggeredChan chan<- TriggerEvent, errorChan chan<- error, ) (TriggerWatcher, error) }
TriggerWatcherFactory allows to create trigger watchers from a given trigger independently of the trigger type
func NewTriggerWatcherFactory ¶
func NewTriggerWatcherFactory( streamListenerFactory events.StreamListenerFactory, triggerStateService services.TriggerStateService, validator models.TriggerValidator, logger log.FieldLogger, ) TriggerWatcherFactory
NewTriggerWatcherFactory creates a new watcher factory for given trigger