Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChoriaPlugin ¶
func ChoriaPlugin() *plugin.WatcherPlugin
Types ¶
type Properties ¶
type Properties struct { // ArchiveChecksum is a sha256 hex string of the archive being downloaded, requires ArchiveChecksumChecksum ArchiveChecksum string `mapstructure:"checksum"` // Creates is a subdirectory that the tarball will create on untar, it has to create a sub directory Creates string // Governor is the optional name of a governor to use for concurrency control Governor string // GovernorTimeout is how long we'll try to access the governor GovernorTimeout time.Duration `mapstructure:"governor_timeout"` // Insecure skips TLS verification on https downloads (not implemented) Insecure bool // Password for accessing the source, required when a username is set Password string // Source is a URL to the file being downloaded, only tar.gz format is supported Source string // TargetDirectory is the directory where the tarball will be extracted TargetDirectory string `mapstructure:"target"` // Timeout is how long HTTP operations are allowed to take Timeout time.Duration // Username is the username to use when downloading, Password is required in addition Username string // ContentChecksums a file in the archive made using sha256 used for verification of files in the archive after extraction and on every interval check ContentChecksums string `mapstructure:"verify"` // ContentChecksumsChecksum is a sha256 hex string of the file specified in ContentChecksums ContentChecksumsChecksum string `mapstructure:"verify_checksum"` }
type StateNotification ¶
type StateNotification struct { event.Event Source string `json:"source"` Creates string `json:"creates"` 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 ¶
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
Click to show internal directories.
Click to hide internal directories.