Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TaskName = "tysm_hook_deactivation" TaskDescriptor = &types.TaskDescriptor{ Name: TaskName, Description: "Cancel a TYSM hook activation. Designed to be placed in a test's cleanupTasks block.", Category: "tysm", Config: DefaultConfig(), Outputs: []types.TaskOutputDefinition{}, NewTask: NewTask, } )
Functions ¶
func NewTask ¶
func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)
Types ¶
type Config ¶
type Config struct {
Endpoint string `yaml:"endpoint" json:"endpoint" require:"A" desc:"Base URL of the TYSM API, e.g. http://beacon:8080"`
AuthToken string `yaml:"auth_token" json:"auth_token" desc:"Bearer token sent in the Authorization header. Prefer supplying via configVars."`
ActivationID string `` /* 176-byte string literal not displayed */
IgnoreNotFound bool `` /* 148-byte string literal not displayed */
}
Config drives a single DELETE against the TYSM hook-control API.
ActivationID is yaml-tagged with snake_case so that playbooks can wire it up via configVars from a previous tysm_hook_activation task's outputs:
configVars: activation_id: "tasks.kzg_chaos.outputs.activation_id"
AuthToken follows the same convention so the bearer token can be supplied via a runtime variable rather than hard-coded in the playbook.
func DefaultConfig ¶
func DefaultConfig() Config
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.