Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFilepathExists(ctx context.Context, cl spec.Channel, filepath string) bool
- func ConvertOutputToResponse(ctx context.Context, output string, err error, defaultResponse *spec.Response) *spec.Response
- func Destroy(ctx context.Context, c spec.Channel, action string) *spec.Response
- func Hierarchy(root string) func() ([]cgroups.Subsystem, error)
- func NewSSHExecutor() spec.Executor
- func PidPath(pid int) cgroups.Path
- type SSHClient
- type SSHExecutor
Constants ¶
View Source
const ( DefaultInstallPath = "/opt/chaosblade" BladeBin = "blade" DefaultSSHPort = 22 BladeReleaseURL = "https://chaosblade.oss-cn-hangzhou.aliyuncs.com/agent/github/%s/chaosblade-%s-linux-amd64.tar.gz" )
Variables ¶
View Source
var BladeRelease = &spec.ExpFlag{ Name: "blade-release", Desc: "Blade release package,use this flag when the channel is ssh", NoArgs: false, Required: false, }
View Source
var ChannelFlag = &spec.ExpFlag{ Name: "channel", Desc: "Select the channel for execution, and you can now select SSH", NoArgs: false, Required: false, }
support ssh channel flags
View Source
var InstallPath = &spec.ExpFlag{ Name: "install-path", Desc: "install path default /opt/chaosblade,use this flag when the channel is ssh", NoArgs: false, Required: false, }
View Source
var OverrideBladeRelease = &spec.ExpFlag{ Name: "override-blade-release", Desc: "Override blade release,use this flag when the channel is ssh", NoArgs: true, Required: false, }
View Source
var SSHHostFlag = &spec.ExpFlag{ Name: "ssh-host", Desc: "Use this flag when the channel is ssh", NoArgs: false, Required: false, }
View Source
var SSHKeyFlag = &spec.ExpFlag{ Name: "ssh-key", Desc: "Use this flag when the channel is ssh", NoArgs: false, Required: false, }
View Source
var SSHKeyPassphraseFlag = &spec.ExpFlag{ Name: "ssh-key-passphrase", Desc: "Use this flag when the channel is ssh", NoArgs: true, Required: false, }
View Source
var SSHPortFlag = &spec.ExpFlag{ Name: "ssh-port", Desc: "Use this flag when the channel is ssh", NoArgs: false, Required: false, }
View Source
var SSHUserFlag = &spec.ExpFlag{ Name: "ssh-user", Desc: "Use this flag when the channel is ssh", NoArgs: false, Required: false, }
Functions ¶
func CheckFilepathExists ¶
func ConvertOutputToResponse ¶
func NewSSHExecutor ¶
Types ¶
type SSHClient ¶
type SSHExecutor ¶
func (*SSHExecutor) Name ¶
func (*SSHExecutor) Name() string
func (*SSHExecutor) SetChannel ¶
func (e *SSHExecutor) SetChannel(channel spec.Channel)
Click to show internal directories.
Click to hide internal directories.