adapter

package
v0.6.14 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MPL-2.0 Imports: 17 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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