Documentation
¶
Index ¶
- Variables
- func CheckSSHHosts(userPassedHosts []session.Host, nodesNames []string, phase string, ...) (map[string]string, error)
- func ExecuteRemoteScriptPath(u ScriptPath, scriptName string, full bool) string
- func ParseSSHPrivateKey(keyData []byte, keyName string, passphraseConsumer PassphraseConsumer) (any, string, error)
- func ParseSSHPrivateKeyFile(path string, password string, logger log.Logger) (any, string, error)
- func SafeClose(conn io.Closer, presentHandlers ...PresentCloseHandler) error
- type BaseReverseTunnelRoutines
- type Bundle
- type BundleOpt
- func BundleWithCommandKiller(k CommandKiller) BundleOpt
- func BundleWithCommandPreparator(p CommandPreparator) BundleOpt
- func BundleWithNoLogStepOutOnError(v bool) BundleOpt
- func BundleWithRetries(r int) BundleOpt
- func BundleWithStepHeader(r *regexp.Regexp) BundleOpt
- func BundleWithStepsDelimiter(d string) BundleOpt
- func UserBundleOptsOrBashible(inputOpts ...connection.BundlerOption) ([]BundleOpt, error)
- type ByteSequenceMatcher
- type Check
- func (c *Check) AwaitAvailability(ctx context.Context, loopParams retry.Params) error
- func (c *Check) CheckAvailability(ctx context.Context) error
- func (c *Check) ExpectAvailable(ctx context.Context) ([]byte, error)
- func (c *Check) String() string
- func (c *Check) WithDelaySeconds(seconds int) ssh.Check
- type CommandConsumer
- type CommandKiller
- type CommandPreparator
- type DefaultPassphraseOnlyConsumer
- type EmptyReverseTunnelKiller
- type PassphraseConsumer
- type PresentCloseHandler
- type RunScriptReverseTunnelChecker
- type RunScriptReverseTunnelKiller
- type ScriptPath
- type TerminalPassphraseConsumer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTimeout = errors.New("Timeout step running")
)
Functions ¶
func CheckSSHHosts ¶
func ExecuteRemoteScriptPath ¶
func ExecuteRemoteScriptPath(u ScriptPath, scriptName string, full bool) string
ExecuteRemoteScriptPath deprecated - ugly solution
func ParseSSHPrivateKey ¶
func ParseSSHPrivateKeyFile ¶
Types ¶
type BaseReverseTunnelRoutines ¶
type BaseReverseTunnelRoutines[T any] struct { // contains filtered or unexported fields }
func (*BaseReverseTunnelRoutines[T]) SetUploadDirAndCleanup ¶
func (b *BaseReverseTunnelRoutines[T]) SetUploadDirAndCleanup(dir string) *T
func (*BaseReverseTunnelRoutines[T]) WithCleanup ¶
func (b *BaseReverseTunnelRoutines[T]) WithCleanup() *T
func (*BaseReverseTunnelRoutines[T]) WithUploadDir ¶
func (b *BaseReverseTunnelRoutines[T]) WithUploadDir(dir string) *T
type BundleOpt ¶
type BundleOpt func(*Bundle)
func BundleWithCommandKiller ¶
func BundleWithCommandKiller(k CommandKiller) BundleOpt
func BundleWithCommandPreparator ¶
func BundleWithCommandPreparator(p CommandPreparator) BundleOpt
func BundleWithRetries ¶
func BundleWithStepHeader ¶
func UserBundleOptsOrBashible ¶
func UserBundleOptsOrBashible(inputOpts ...connection.BundlerOption) ([]BundleOpt, error)
type ByteSequenceMatcher ¶
type ByteSequenceMatcher struct {
// settings
Pattern string
// contains filtered or unexported fields
}
ByteSequenceMatcher can be used to match byte stream against a string byte by byte.
func NewByteSequenceMatcher ¶
func NewByteSequenceMatcher(pattern string) *ByteSequenceMatcher
func (*ByteSequenceMatcher) Analyze ¶
func (m *ByteSequenceMatcher) Analyze(buf []byte) int
Analyze matches Pattern from byte stream and ignores \r and \n after it. when match is not found, return n when match is found, return 0 return index (0 or more) of a first byte after pattern and \r, \n This behaviour is used to write bytes to Reader only after match is found.
func (*ByteSequenceMatcher) IsMatched ¶
func (m *ByteSequenceMatcher) IsMatched() bool
func (*ByteSequenceMatcher) Reset ¶
func (m *ByteSequenceMatcher) Reset()
func (*ByteSequenceMatcher) WaitNonMatched ¶
func (m *ByteSequenceMatcher) WaitNonMatched() *ByteSequenceMatcher
type CommandKiller ¶
type CommandKiller func(connection.Command)
type CommandPreparator ¶
type CommandPreparator func(connection.Command)
type DefaultPassphraseOnlyConsumer ¶
type DefaultPassphraseOnlyConsumer struct {
// contains filtered or unexported fields
}
func NewDefaultPassphraseOnlyConsumer ¶
func NewDefaultPassphraseOnlyConsumer(defaultPassword string) *DefaultPassphraseOnlyConsumer
func (*DefaultPassphraseOnlyConsumer) AskPassword ¶
func (c *DefaultPassphraseOnlyConsumer) AskPassword(prompt string) ([]byte, error)
func (DefaultPassphraseOnlyConsumer) DefaultPassword ¶
func (c DefaultPassphraseOnlyConsumer) DefaultPassword() []byte
type EmptyReverseTunnelKiller ¶
type EmptyReverseTunnelKiller struct{}
func (EmptyReverseTunnelKiller) KillTunnel ¶
func (k EmptyReverseTunnelKiller) KillTunnel(context.Context) (string, error)
type PassphraseConsumer ¶
type PresentCloseHandler ¶
type PresentCloseHandler func(isPresent bool)
type RunScriptReverseTunnelChecker ¶
type RunScriptReverseTunnelChecker struct {
*BaseReverseTunnelRoutines[RunScriptReverseTunnelChecker]
// contains filtered or unexported fields
}
func NewRunScriptReverseTunnelChecker ¶
func NewRunScriptReverseTunnelChecker(c ssh.SSHClient, scriptPath string) *RunScriptReverseTunnelChecker
func (*RunScriptReverseTunnelChecker) CheckTunnel ¶
func (s *RunScriptReverseTunnelChecker) CheckTunnel(ctx context.Context) (string, error)
type RunScriptReverseTunnelKiller ¶
type RunScriptReverseTunnelKiller struct {
*BaseReverseTunnelRoutines[RunScriptReverseTunnelKiller]
// contains filtered or unexported fields
}
func NewRunScriptReverseTunnelKiller ¶
func NewRunScriptReverseTunnelKiller(c ssh.SSHClient, scriptPath string) *RunScriptReverseTunnelKiller
func (*RunScriptReverseTunnelKiller) KillTunnel ¶
func (s *RunScriptReverseTunnelKiller) KillTunnel(ctx context.Context) (string, error)
type ScriptPath ¶
type TerminalPassphraseConsumer ¶
type TerminalPassphraseConsumer struct {
// contains filtered or unexported fields
}
func NewTerminalPassphraseConsumer ¶
func NewTerminalPassphraseConsumer(logger log.Logger, defaultPassword []byte) *TerminalPassphraseConsumer
func (*TerminalPassphraseConsumer) AskPassword ¶
func (c *TerminalPassphraseConsumer) AskPassword(prompt string) ([]byte, error)
func (TerminalPassphraseConsumer) DefaultPassword ¶
func (c TerminalPassphraseConsumer) DefaultPassword() []byte
Source Files
¶
Click to show internal directories.
Click to hide internal directories.