Documentation
¶
Index ¶
Constants ¶
const ( TypeDeleteTestData = "DeleteTestData" TypeDownloadAsset = "DownloadAsset" TypeKeyValue = "KeyValue" TypeSetGroup = "SetGroup" TypeInstallTestRun = "InstallTestRun" TypeExecuteTestRun = "ExecuteTestRun" )
Task type constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseTask ¶
type BaseTask struct {
Type string `json:"type"`
}
BaseTask is a struct that is intended to be embedded by specific task structs. Both of these in conjunction are used primarily to house the JSON message for passing tasks over the comms package (i.e. message queue), but may also contain important dependencies of the task, such as an HTTP handler.
type DeleteTestData ¶
DeleteTestData embeds BaseTask and adds the necessary fields to transport a DeleteTestData task through comms
func NewDeleteTestData ¶
func NewDeleteTestData(uuid string) *DeleteTestData
NewDeleteTestData returns a new DeleteTestData tasks.
func (*DeleteTestData) Run ¶
func (t *DeleteTestData) Run(_ *config.Config, ac *cache.AgentCache, _ Responder) error
Run contains the logic necessary to perform this task on the agent.
type DownloadAsset ¶
DownloadAsset defines this particular task. It contains definitions not only for the task message, but also HTTPClient, filesystem, and i/o system abstractions to be more conducive to unit testing.
func NewDownloadAsset ¶
func NewDownloadAsset(assets []string) *DownloadAsset
NewDownloadAsset returns a new DownloadAsset task.
func (*DownloadAsset) Run ¶
func (t *DownloadAsset) Run(cfg *config.Config, _ *cache.AgentCache, _ Responder) error
Run contains the logic necessary to perform this task on the agent. This particular task will download all required assets, copy them into the appropriate directory, and ensure that the execute permission is given to each collector file.