sshinit

package
v0.0.0-...-b9bb202 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunConfigureScript

func RunConfigureScript(script string, params ConfigureParams) error

RunConfigureScript connects to the specified host over SSH, and executes the provided script which is expected to have been returned by cloudinit ConfigureScript.

Types

type ConfigureParams

type ConfigureParams struct {
	// Host is the host to configure, in the format [user@]hostname.
	Host string

	// Client is the SSH client to connect with.
	// If Client is nil, ssh.DefaultClient will be used.
	Client ssh.Client

	// SSHOptions contains options for running the SSH command.
	SSHOptions *ssh.Options

	// Config is the cloudinit config to carry out.
	Config cloudinit.CloudConfig

	// ProgressWriter is an io.Writer to which progress will be written,
	// for realtime feedback.
	ProgressWriter io.Writer
}

type FileTransporter

type FileTransporter struct {
	// contains filtered or unexported fields
}

func NewFileTransporter

func NewFileTransporter(params ConfigureParams) *FileTransporter

NewFileTransporter returns an SCP file transporter that implements a cloudinit.FileTransporter to send payloads to the target machine, saving them in a temporary location.

func (*FileTransporter) Dispatch

func (ft *FileTransporter) Dispatch(ctx context.Context) error

Dispatch for all the files to finish transferring before returning.

func (*FileTransporter) SendBytes

func (ft *FileTransporter) SendBytes(hint string, payload []byte) string

SendBytes implements cloudinit.FileTransporter

Jump to

Keyboard shortcuts

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