host

package
v1.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 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 host contains a utility to run commands on the Docker host by using an image in privileged mode.

Create an HostHelper with NewHostHelper

Index

Constants

View Source
const (
	DefaultVolumesDir = "/var/lib/origin/openshift.local.volumes"
	DefaultConfigDir  = "/var/lib/origin/openshift.local.config"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostHelper

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

HostHelper contains methods to help check settings on a Docker host machine using a privileged container

func NewHostHelper

func NewHostHelper(client *docker.Client, image, volumesDir, configDir, dataDir string) *HostHelper

NewHostHelper creates a new HostHelper

func (*HostHelper) CanUseNsenterMounter

func (h *HostHelper) CanUseNsenterMounter() (bool, error)

CanUseNsenterMounter returns true if the Docker host machine can execute findmnt through nsenter

func (*HostHelper) DownloadDirFromContainer added in v1.4.0

func (h *HostHelper) DownloadDirFromContainer(sourceDir, destDir string) error

DownloadDirFromContainer copies a set of files from the Docker host to the local file system

func (*HostHelper) EnsureHostDirectories

func (h *HostHelper) EnsureHostDirectories() error

func (*HostHelper) EnsureVolumeShare

func (h *HostHelper) EnsureVolumeShare() error

EnsureVolumeShare ensures that the host Docker machine has a shared directory that can be used for OpenShift volumes

func (*HostHelper) Hostname

func (h *HostHelper) Hostname() (string, error)

Hostname retrieves the FQDN of the Docker host machine

func (*HostHelper) UploadFileToContainer added in v1.4.0

func (h *HostHelper) UploadFileToContainer(src, dst string) error

UploadFileToContainer copies a local file to the Docker host

Jump to

Keyboard shortcuts

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