clients

package
v0.49.0-rc.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package clients implements utility clients

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(client *ssh.Client, src string, dst string) error

CopyFile create a sftp session and copy a single file to the remote host through SSH

func CopyFolder

func CopyFolder(client *ssh.Client, srcFolder string, dstFolder string) error

CopyFolder create a sftp session and copy a folder to remote host through SSH

func ExecuteCommand

func ExecuteCommand(client *ssh.Client, command string) (string, error)

ExecuteCommand creates a session on an ssh client and runs a command. It returns the command output and errors

func GetAWSSSMClient

func GetAWSSSMClient() (*ssm.Client, error)

GetAWSSSMClient returns an aws SSM client

func GetSSHClient

func GetSSHClient(user, host string, privateKey []byte, retryInterval time.Duration, maxRetries uint64) (client *ssh.Client, session *ssh.Session, err error)

GetSSHClient returns an ssh Client for the specified host

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL