adapter

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package adapter helps command line tools connect to the guest via a Packer communicator.

A typical use is for custom provisioners that wrap command line tools. For example, the Ansible provisioner and the Inspec provisioner both use this package to proxy communicator calls.

You may want to use this adapter if you are writing a provisioner that wraps a tool which under normal usage would be run locally and form a connection to the remote instance itself.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

An adapter satisfies SSH requests (from an Ansible client) by delegating SSH exec and subsystem commands to a packersdk.Communicator.

func NewAdapter

func NewAdapter(done <-chan struct{}, l net.Listener, config *ssh.ServerConfig, sftpCmd string, ui packersdk.Ui, comm packersdk.Communicator) *Adapter

func (*Adapter) Handle

func (c *Adapter) Handle(conn net.Conn, ui packersdk.Ui) error

func (*Adapter) Serve

func (c *Adapter) Serve()

func (*Adapter) Shutdown

func (c *Adapter) Shutdown()

Jump to

Keyboard shortcuts

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