Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Machine ¶
type Machine interface { State() string Transition(t string, args ...interface{}) error NotifyWatcherState(string, interface{}) Name() string Directory() string Identity() string InstanceID() string Version() string TimeStampSeconds() int64 Debugf(name string, format string, args ...interface{}) Infof(name string, format string, args ...interface{}) Errorf(name string, format string, args ...interface{}) }
type StateNotification ¶
type StateNotification struct { Protocol string `json:"protocol"` Identity string `json:"identity"` ID string `json:"id"` Version string `json:"version"` Timestamp int64 `json:"timestamp"` Type string `json:"type"` Machine string `json:"machine"` Name string `json:"name"` Command string `json:"command"` PreviousOutcome string `json:"previous_outcome"` PreviousRunTime int64 `json:"previous_run_time"` }
StateNotification describes the current state of the watcher described by io.choria.machine.watcher.exec.v1.state
func (*StateNotification) CloudEvent ¶ added in v0.13.0
func (s *StateNotification) CloudEvent() cloudevents.Event
CloudEvent creates a CloudEvent from the state notification
func (*StateNotification) JSON ¶
func (s *StateNotification) JSON() ([]byte, error)
JSON creates a JSON representation of the notification
func (*StateNotification) String ¶
func (s *StateNotification) String() string
String is a string representation of the notification suitable for printing
func (*StateNotification) WatcherType ¶
func (s *StateNotification) WatcherType() string
WatcherType is the type of watcher the notification is for - exec, file etc
type Watcher ¶
func (*Watcher) AnnounceInterval ¶
func (*Watcher) CurrentState ¶
func (w *Watcher) CurrentState() interface{}
func (*Watcher) NotifyStateChance ¶
func (w *Watcher) NotifyStateChance()
Click to show internal directories.
Click to hide internal directories.