Documentation ¶
Overview ¶
Package model is a generated GoMock package.
Index ¶
- type ChoriaProvider
- type Machine
- type MachineConstructor
- type MockChoriaProvider
- func (m *MockChoriaProvider) Connector() inter.Connector
- func (m *MockChoriaProvider) EXPECT() *MockChoriaProviderMockRecorder
- func (m *MockChoriaProvider) Facts() json.RawMessage
- func (m *MockChoriaProvider) Identity() string
- func (m *MockChoriaProvider) Logger(arg0 string) *logrus.Entry
- func (m *MockChoriaProvider) MainCollective() string
- func (m *MockChoriaProvider) PrometheusTextFileDir() string
- func (m *MockChoriaProvider) PublishRaw(arg0 string, arg1 []byte) error
- func (m *MockChoriaProvider) ScoutOverridesPath() string
- func (m *MockChoriaProvider) ServerStatusFile() (string, int)
- type MockChoriaProviderMockRecorder
- func (mr *MockChoriaProviderMockRecorder) Connector() *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) Facts() *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) Identity() *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) Logger(arg0 interface{}) *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) MainCollective() *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) PrometheusTextFileDir() *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) PublishRaw(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) ScoutOverridesPath() *gomock.Call
- func (mr *MockChoriaProviderMockRecorder) ServerStatusFile() *gomock.Call
- type MockMachine
- func (m *MockMachine) ChoriaStatusFile() (string, int)
- func (m *MockMachine) Data() map[string]interface{}
- func (m *MockMachine) DataDelete(arg0 string) error
- func (m *MockMachine) DataGet(arg0 string) (interface{}, bool)
- func (m *MockMachine) DataPut(arg0 string, arg1 interface{}) error
- func (m *MockMachine) Debugf(arg0, arg1 string, arg2 ...interface{})
- func (m *MockMachine) Directory() string
- func (m *MockMachine) EXPECT() *MockMachineMockRecorder
- func (m *MockMachine) Errorf(arg0, arg1 string, arg2 ...interface{})
- func (m *MockMachine) Facts() json.RawMessage
- func (m *MockMachine) Identity() string
- func (m *MockMachine) Infof(arg0, arg1 string, arg2 ...interface{})
- func (m *MockMachine) InstanceID() string
- func (m *MockMachine) JetStreamConnection() (*jsm_go.Manager, error)
- func (m *MockMachine) MainCollective() string
- func (m *MockMachine) Name() string
- func (m *MockMachine) NotifyWatcherState(arg0 string, arg1 interface{})
- func (m *MockMachine) OverrideData() ([]byte, error)
- func (m *MockMachine) PublishLifecycleEvent(arg0 lifecycle.Type, arg1 ...lifecycle.Option)
- func (m *MockMachine) SignerKey() string
- func (m *MockMachine) State() string
- func (m *MockMachine) TextFileDirectory() string
- func (m *MockMachine) TimeStampSeconds() int64
- func (m *MockMachine) Transition(arg0 string, arg1 ...interface{}) error
- func (m *MockMachine) Version() string
- func (m *MockMachine) Warnf(arg0, arg1 string, arg2 ...interface{})
- type MockMachineMockRecorder
- func (mr *MockMachineMockRecorder) ChoriaStatusFile() *gomock.Call
- func (mr *MockMachineMockRecorder) Data() *gomock.Call
- func (mr *MockMachineMockRecorder) DataDelete(arg0 interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) DataGet(arg0 interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) DataPut(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) Debugf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) Directory() *gomock.Call
- func (mr *MockMachineMockRecorder) Errorf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) Facts() *gomock.Call
- func (mr *MockMachineMockRecorder) Identity() *gomock.Call
- func (mr *MockMachineMockRecorder) Infof(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) InstanceID() *gomock.Call
- func (mr *MockMachineMockRecorder) JetStreamConnection() *gomock.Call
- func (mr *MockMachineMockRecorder) MainCollective() *gomock.Call
- func (mr *MockMachineMockRecorder) Name() *gomock.Call
- func (mr *MockMachineMockRecorder) NotifyWatcherState(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) OverrideData() *gomock.Call
- func (mr *MockMachineMockRecorder) PublishLifecycleEvent(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) SignerKey() *gomock.Call
- func (mr *MockMachineMockRecorder) State() *gomock.Call
- func (mr *MockMachineMockRecorder) TextFileDirectory() *gomock.Call
- func (mr *MockMachineMockRecorder) TimeStampSeconds() *gomock.Call
- func (mr *MockMachineMockRecorder) Transition(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- func (mr *MockMachineMockRecorder) Version() *gomock.Call
- func (mr *MockMachineMockRecorder) Warnf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- type MockWatcher
- func (m *MockWatcher) AnnounceInterval() time.Duration
- func (m *MockWatcher) CurrentState() interface{}
- func (m *MockWatcher) Delete()
- func (m *MockWatcher) EXPECT() *MockWatcherMockRecorder
- func (m *MockWatcher) Name() string
- func (m *MockWatcher) NotifyStateChance()
- func (m *MockWatcher) Run(arg0 context.Context, arg1 *sync.WaitGroup)
- func (m *MockWatcher) Type() string
- type MockWatcherConstructor
- func (m *MockWatcherConstructor) EXPECT() *MockWatcherConstructorMockRecorder
- func (m *MockWatcherConstructor) EventType() string
- func (m *MockWatcherConstructor) New(arg0 Machine, arg1 string, arg2 []string, arg3, arg4, arg5 string, ...) (interface{}, error)
- func (m *MockWatcherConstructor) Type() string
- func (m *MockWatcherConstructor) UnmarshalNotification(arg0 []byte) (interface{}, error)
- type MockWatcherConstructorMockRecorder
- func (mr *MockWatcherConstructorMockRecorder) EventType() *gomock.Call
- func (mr *MockWatcherConstructorMockRecorder) New(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call
- func (mr *MockWatcherConstructorMockRecorder) Type() *gomock.Call
- func (mr *MockWatcherConstructorMockRecorder) UnmarshalNotification(arg0 interface{}) *gomock.Call
- type MockWatcherMockRecorder
- func (mr *MockWatcherMockRecorder) AnnounceInterval() *gomock.Call
- func (mr *MockWatcherMockRecorder) CurrentState() *gomock.Call
- func (mr *MockWatcherMockRecorder) Delete() *gomock.Call
- func (mr *MockWatcherMockRecorder) Name() *gomock.Call
- func (mr *MockWatcherMockRecorder) NotifyStateChance() *gomock.Call
- func (mr *MockWatcherMockRecorder) Run(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWatcherMockRecorder) Type() *gomock.Call
- type Watcher
- type WatcherConstructor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChoriaProvider ¶
type ChoriaProvider interface { PublishRaw(string, []byte) error Logger(string) *logrus.Entry Identity() string PrometheusTextFileDir() string ScoutOverridesPath() string ServerStatusFile() (string, int) MainCollective() string Connector() inter.Connector Facts() json.RawMessage MachineSignerKey() string }
ChoriaProvider provides access to the choria framework
type Machine ¶
type Machine interface { State() string Transition(t string, args ...any) error NotifyWatcherState(string, any) Name() string Directory() string TextFileDirectory() string Identity() string InstanceID() string Version() string TimeStampSeconds() int64 OverrideData() ([]byte, error) ChoriaStatusFile() (string, int) JetStreamConnection() (*jsm.Manager, error) PublishLifecycleEvent(t lifecycle.Type, opts ...lifecycle.Option) MainCollective() string Facts() json.RawMessage Data() map[string]any DataPut(key string, val any) error DataGet(key string) (any, bool) DataDelete(key string) error SignerKey() string Debugf(name string, format string, args ...any) Infof(name string, format string, args ...any) Warnf(name string, format string, args ...any) Errorf(name string, format string, args ...any) }
type MachineConstructor ¶ added in v0.24.0
type MockChoriaProvider ¶
type MockChoriaProvider struct {
// contains filtered or unexported fields
}
MockChoriaProvider is a mock of ChoriaProvider interface.
func NewMockChoriaProvider ¶
func NewMockChoriaProvider(ctrl *gomock.Controller) *MockChoriaProvider
NewMockChoriaProvider creates a new mock instance.
func (*MockChoriaProvider) Connector ¶
func (m *MockChoriaProvider) Connector() inter.Connector
Connector mocks base method.
func (*MockChoriaProvider) EXPECT ¶
func (m *MockChoriaProvider) EXPECT() *MockChoriaProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockChoriaProvider) Facts ¶
func (m *MockChoriaProvider) Facts() json.RawMessage
Facts mocks base method.
func (*MockChoriaProvider) Identity ¶
func (m *MockChoriaProvider) Identity() string
Identity mocks base method.
func (*MockChoriaProvider) Logger ¶
func (m *MockChoriaProvider) Logger(arg0 string) *logrus.Entry
Logger mocks base method.
func (*MockChoriaProvider) MainCollective ¶
func (m *MockChoriaProvider) MainCollective() string
MainCollective mocks base method.
func (*MockChoriaProvider) PrometheusTextFileDir ¶
func (m *MockChoriaProvider) PrometheusTextFileDir() string
PrometheusTextFileDir mocks base method.
func (*MockChoriaProvider) PublishRaw ¶
func (m *MockChoriaProvider) PublishRaw(arg0 string, arg1 []byte) error
PublishRaw mocks base method.
func (*MockChoriaProvider) ScoutOverridesPath ¶
func (m *MockChoriaProvider) ScoutOverridesPath() string
ScoutOverridesPath mocks base method.
func (*MockChoriaProvider) ServerStatusFile ¶
func (m *MockChoriaProvider) ServerStatusFile() (string, int)
ServerStatusFile mocks base method.
type MockChoriaProviderMockRecorder ¶
type MockChoriaProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockChoriaProviderMockRecorder is the mock recorder for MockChoriaProvider.
func (*MockChoriaProviderMockRecorder) Connector ¶
func (mr *MockChoriaProviderMockRecorder) Connector() *gomock.Call
Connector indicates an expected call of Connector.
func (*MockChoriaProviderMockRecorder) Facts ¶
func (mr *MockChoriaProviderMockRecorder) Facts() *gomock.Call
Facts indicates an expected call of Facts.
func (*MockChoriaProviderMockRecorder) Identity ¶
func (mr *MockChoriaProviderMockRecorder) Identity() *gomock.Call
Identity indicates an expected call of Identity.
func (*MockChoriaProviderMockRecorder) Logger ¶
func (mr *MockChoriaProviderMockRecorder) Logger(arg0 interface{}) *gomock.Call
Logger indicates an expected call of Logger.
func (*MockChoriaProviderMockRecorder) MainCollective ¶
func (mr *MockChoriaProviderMockRecorder) MainCollective() *gomock.Call
MainCollective indicates an expected call of MainCollective.
func (*MockChoriaProviderMockRecorder) PrometheusTextFileDir ¶
func (mr *MockChoriaProviderMockRecorder) PrometheusTextFileDir() *gomock.Call
PrometheusTextFileDir indicates an expected call of PrometheusTextFileDir.
func (*MockChoriaProviderMockRecorder) PublishRaw ¶
func (mr *MockChoriaProviderMockRecorder) PublishRaw(arg0, arg1 interface{}) *gomock.Call
PublishRaw indicates an expected call of PublishRaw.
func (*MockChoriaProviderMockRecorder) ScoutOverridesPath ¶
func (mr *MockChoriaProviderMockRecorder) ScoutOverridesPath() *gomock.Call
ScoutOverridesPath indicates an expected call of ScoutOverridesPath.
func (*MockChoriaProviderMockRecorder) ServerStatusFile ¶
func (mr *MockChoriaProviderMockRecorder) ServerStatusFile() *gomock.Call
ServerStatusFile indicates an expected call of ServerStatusFile.
type MockMachine ¶
type MockMachine struct {
// contains filtered or unexported fields
}
MockMachine is a mock of Machine interface.
func NewMockMachine ¶
func NewMockMachine(ctrl *gomock.Controller) *MockMachine
NewMockMachine creates a new mock instance.
func (*MockMachine) ChoriaStatusFile ¶
func (m *MockMachine) ChoriaStatusFile() (string, int)
ChoriaStatusFile mocks base method.
func (*MockMachine) Data ¶
func (m *MockMachine) Data() map[string]interface{}
Data mocks base method.
func (*MockMachine) DataDelete ¶
func (m *MockMachine) DataDelete(arg0 string) error
DataDelete mocks base method.
func (*MockMachine) DataGet ¶
func (m *MockMachine) DataGet(arg0 string) (interface{}, bool)
DataGet mocks base method.
func (*MockMachine) DataPut ¶
func (m *MockMachine) DataPut(arg0 string, arg1 interface{}) error
DataPut mocks base method.
func (*MockMachine) Debugf ¶
func (m *MockMachine) Debugf(arg0, arg1 string, arg2 ...interface{})
Debugf mocks base method.
func (*MockMachine) Directory ¶
func (m *MockMachine) Directory() string
Directory mocks base method.
func (*MockMachine) EXPECT ¶
func (m *MockMachine) EXPECT() *MockMachineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMachine) Errorf ¶
func (m *MockMachine) Errorf(arg0, arg1 string, arg2 ...interface{})
Errorf mocks base method.
func (*MockMachine) Infof ¶
func (m *MockMachine) Infof(arg0, arg1 string, arg2 ...interface{})
Infof mocks base method.
func (*MockMachine) InstanceID ¶
func (m *MockMachine) InstanceID() string
InstanceID mocks base method.
func (*MockMachine) JetStreamConnection ¶
func (m *MockMachine) JetStreamConnection() (*jsm_go.Manager, error)
JetStreamConnection mocks base method.
func (*MockMachine) MainCollective ¶
func (m *MockMachine) MainCollective() string
MainCollective mocks base method.
func (*MockMachine) NotifyWatcherState ¶
func (m *MockMachine) NotifyWatcherState(arg0 string, arg1 interface{})
NotifyWatcherState mocks base method.
func (*MockMachine) OverrideData ¶
func (m *MockMachine) OverrideData() ([]byte, error)
OverrideData mocks base method.
func (*MockMachine) PublishLifecycleEvent ¶
func (m *MockMachine) PublishLifecycleEvent(arg0 lifecycle.Type, arg1 ...lifecycle.Option)
PublishLifecycleEvent mocks base method.
func (*MockMachine) SignerKey ¶ added in v0.27.0
func (m *MockMachine) SignerKey() string
SignerKey mocks base method.
func (*MockMachine) TextFileDirectory ¶
func (m *MockMachine) TextFileDirectory() string
TextFileDirectory mocks base method.
func (*MockMachine) TimeStampSeconds ¶
func (m *MockMachine) TimeStampSeconds() int64
TimeStampSeconds mocks base method.
func (*MockMachine) Transition ¶
func (m *MockMachine) Transition(arg0 string, arg1 ...interface{}) error
Transition mocks base method.
func (*MockMachine) Warnf ¶
func (m *MockMachine) Warnf(arg0, arg1 string, arg2 ...interface{})
Warnf mocks base method.
type MockMachineMockRecorder ¶
type MockMachineMockRecorder struct {
// contains filtered or unexported fields
}
MockMachineMockRecorder is the mock recorder for MockMachine.
func (*MockMachineMockRecorder) ChoriaStatusFile ¶
func (mr *MockMachineMockRecorder) ChoriaStatusFile() *gomock.Call
ChoriaStatusFile indicates an expected call of ChoriaStatusFile.
func (*MockMachineMockRecorder) Data ¶
func (mr *MockMachineMockRecorder) Data() *gomock.Call
Data indicates an expected call of Data.
func (*MockMachineMockRecorder) DataDelete ¶
func (mr *MockMachineMockRecorder) DataDelete(arg0 interface{}) *gomock.Call
DataDelete indicates an expected call of DataDelete.
func (*MockMachineMockRecorder) DataGet ¶
func (mr *MockMachineMockRecorder) DataGet(arg0 interface{}) *gomock.Call
DataGet indicates an expected call of DataGet.
func (*MockMachineMockRecorder) DataPut ¶
func (mr *MockMachineMockRecorder) DataPut(arg0, arg1 interface{}) *gomock.Call
DataPut indicates an expected call of DataPut.
func (*MockMachineMockRecorder) Debugf ¶
func (mr *MockMachineMockRecorder) Debugf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Debugf indicates an expected call of Debugf.
func (*MockMachineMockRecorder) Directory ¶
func (mr *MockMachineMockRecorder) Directory() *gomock.Call
Directory indicates an expected call of Directory.
func (*MockMachineMockRecorder) Errorf ¶
func (mr *MockMachineMockRecorder) Errorf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Errorf indicates an expected call of Errorf.
func (*MockMachineMockRecorder) Facts ¶
func (mr *MockMachineMockRecorder) Facts() *gomock.Call
Facts indicates an expected call of Facts.
func (*MockMachineMockRecorder) Identity ¶
func (mr *MockMachineMockRecorder) Identity() *gomock.Call
Identity indicates an expected call of Identity.
func (*MockMachineMockRecorder) Infof ¶
func (mr *MockMachineMockRecorder) Infof(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Infof indicates an expected call of Infof.
func (*MockMachineMockRecorder) InstanceID ¶
func (mr *MockMachineMockRecorder) InstanceID() *gomock.Call
InstanceID indicates an expected call of InstanceID.
func (*MockMachineMockRecorder) JetStreamConnection ¶
func (mr *MockMachineMockRecorder) JetStreamConnection() *gomock.Call
JetStreamConnection indicates an expected call of JetStreamConnection.
func (*MockMachineMockRecorder) MainCollective ¶
func (mr *MockMachineMockRecorder) MainCollective() *gomock.Call
MainCollective indicates an expected call of MainCollective.
func (*MockMachineMockRecorder) Name ¶
func (mr *MockMachineMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name.
func (*MockMachineMockRecorder) NotifyWatcherState ¶
func (mr *MockMachineMockRecorder) NotifyWatcherState(arg0, arg1 interface{}) *gomock.Call
NotifyWatcherState indicates an expected call of NotifyWatcherState.
func (*MockMachineMockRecorder) OverrideData ¶
func (mr *MockMachineMockRecorder) OverrideData() *gomock.Call
OverrideData indicates an expected call of OverrideData.
func (*MockMachineMockRecorder) PublishLifecycleEvent ¶
func (mr *MockMachineMockRecorder) PublishLifecycleEvent(arg0 interface{}, arg1 ...interface{}) *gomock.Call
PublishLifecycleEvent indicates an expected call of PublishLifecycleEvent.
func (*MockMachineMockRecorder) SignerKey ¶ added in v0.27.0
func (mr *MockMachineMockRecorder) SignerKey() *gomock.Call
SignerKey indicates an expected call of SignerKey.
func (*MockMachineMockRecorder) State ¶
func (mr *MockMachineMockRecorder) State() *gomock.Call
State indicates an expected call of State.
func (*MockMachineMockRecorder) TextFileDirectory ¶
func (mr *MockMachineMockRecorder) TextFileDirectory() *gomock.Call
TextFileDirectory indicates an expected call of TextFileDirectory.
func (*MockMachineMockRecorder) TimeStampSeconds ¶
func (mr *MockMachineMockRecorder) TimeStampSeconds() *gomock.Call
TimeStampSeconds indicates an expected call of TimeStampSeconds.
func (*MockMachineMockRecorder) Transition ¶
func (mr *MockMachineMockRecorder) Transition(arg0 interface{}, arg1 ...interface{}) *gomock.Call
Transition indicates an expected call of Transition.
func (*MockMachineMockRecorder) Version ¶
func (mr *MockMachineMockRecorder) Version() *gomock.Call
Version indicates an expected call of Version.
func (*MockMachineMockRecorder) Warnf ¶
func (mr *MockMachineMockRecorder) Warnf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Warnf indicates an expected call of Warnf.
type MockWatcher ¶
type MockWatcher struct {
// contains filtered or unexported fields
}
MockWatcher is a mock of Watcher interface.
func NewMockWatcher ¶
func NewMockWatcher(ctrl *gomock.Controller) *MockWatcher
NewMockWatcher creates a new mock instance.
func (*MockWatcher) AnnounceInterval ¶
func (m *MockWatcher) AnnounceInterval() time.Duration
AnnounceInterval mocks base method.
func (*MockWatcher) CurrentState ¶
func (m *MockWatcher) CurrentState() interface{}
CurrentState mocks base method.
func (*MockWatcher) EXPECT ¶
func (m *MockWatcher) EXPECT() *MockWatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWatcher) NotifyStateChance ¶
func (m *MockWatcher) NotifyStateChance()
NotifyStateChance mocks base method.
type MockWatcherConstructor ¶
type MockWatcherConstructor struct {
// contains filtered or unexported fields
}
MockWatcherConstructor is a mock of WatcherConstructor interface.
func NewMockWatcherConstructor ¶
func NewMockWatcherConstructor(ctrl *gomock.Controller) *MockWatcherConstructor
NewMockWatcherConstructor creates a new mock instance.
func (*MockWatcherConstructor) EXPECT ¶
func (m *MockWatcherConstructor) EXPECT() *MockWatcherConstructorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWatcherConstructor) EventType ¶
func (m *MockWatcherConstructor) EventType() string
EventType mocks base method.
func (*MockWatcherConstructor) New ¶
func (m *MockWatcherConstructor) New(arg0 Machine, arg1 string, arg2 []string, arg3, arg4, arg5 string, arg6 time.Duration, arg7 map[string]interface{}) (interface{}, error)
New mocks base method.
func (*MockWatcherConstructor) Type ¶
func (m *MockWatcherConstructor) Type() string
Type mocks base method.
func (*MockWatcherConstructor) UnmarshalNotification ¶
func (m *MockWatcherConstructor) UnmarshalNotification(arg0 []byte) (interface{}, error)
UnmarshalNotification mocks base method.
type MockWatcherConstructorMockRecorder ¶
type MockWatcherConstructorMockRecorder struct {
// contains filtered or unexported fields
}
MockWatcherConstructorMockRecorder is the mock recorder for MockWatcherConstructor.
func (*MockWatcherConstructorMockRecorder) EventType ¶
func (mr *MockWatcherConstructorMockRecorder) EventType() *gomock.Call
EventType indicates an expected call of EventType.
func (*MockWatcherConstructorMockRecorder) New ¶
func (mr *MockWatcherConstructorMockRecorder) New(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call
New indicates an expected call of New.
func (*MockWatcherConstructorMockRecorder) Type ¶
func (mr *MockWatcherConstructorMockRecorder) Type() *gomock.Call
Type indicates an expected call of Type.
func (*MockWatcherConstructorMockRecorder) UnmarshalNotification ¶
func (mr *MockWatcherConstructorMockRecorder) UnmarshalNotification(arg0 interface{}) *gomock.Call
UnmarshalNotification indicates an expected call of UnmarshalNotification.
type MockWatcherMockRecorder ¶
type MockWatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockWatcherMockRecorder is the mock recorder for MockWatcher.
func (*MockWatcherMockRecorder) AnnounceInterval ¶
func (mr *MockWatcherMockRecorder) AnnounceInterval() *gomock.Call
AnnounceInterval indicates an expected call of AnnounceInterval.
func (*MockWatcherMockRecorder) CurrentState ¶
func (mr *MockWatcherMockRecorder) CurrentState() *gomock.Call
CurrentState indicates an expected call of CurrentState.
func (*MockWatcherMockRecorder) Delete ¶
func (mr *MockWatcherMockRecorder) Delete() *gomock.Call
Delete indicates an expected call of Delete.
func (*MockWatcherMockRecorder) Name ¶
func (mr *MockWatcherMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name.
func (*MockWatcherMockRecorder) NotifyStateChance ¶
func (mr *MockWatcherMockRecorder) NotifyStateChance() *gomock.Call
NotifyStateChance indicates an expected call of NotifyStateChance.
func (*MockWatcherMockRecorder) Run ¶
func (mr *MockWatcherMockRecorder) Run(arg0, arg1 interface{}) *gomock.Call
Run indicates an expected call of Run.
func (*MockWatcherMockRecorder) Type ¶
func (mr *MockWatcherMockRecorder) Type() *gomock.Call
Type indicates an expected call of Type.
type Watcher ¶
type Watcher interface { Name() string Type() string Run(context.Context, *sync.WaitGroup) NotifyStateChance() CurrentState() any AnnounceInterval() time.Duration Delete() }
Watcher is anything that can be used to watch the system for events
type WatcherConstructor ¶
type WatcherConstructor interface { New(machine Machine, name string, states []string, failEvent string, successEvent string, interval string, ai time.Duration, properties map[string]any) (any, error) Type() string EventType() string UnmarshalNotification(n []byte) (any, error) }
WatcherConstructor creates a new watcher plugin