netcopy

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostPath added in v0.3.0

type HostPath struct {
	Path string
	Host string
}

HostPath stores a path with host information

func ParseHostPath added in v0.3.0

func ParseHostPath(v string) HostPath

Parse a host path from a string in '[HOST:]PATH' form. no 'HOST:' part implies the local machine

func (*HostPath) Local added in v0.3.0

func (h *HostPath) Local() bool

type NetworkCopier added in v0.3.0

type NetworkCopier interface {
	// Copy transfers a list of files (source) to a given directory (destination).
	// Any one of the paths may be located on the host or remotely.
	Copy(ctx context.Context, source []HostPath, destination HostPath, keyStore sshkeys.KeyStore, knownHosts sshkeys.KnownHosts) error
}

NetworkCopier copies files over the network

type RsyncNetworkCopier

type RsyncNetworkCopier struct{}

The default copier. Uses `rsync` to do the actual work

func NewRsyncNetworkCopier

func NewRsyncNetworkCopier() *RsyncNetworkCopier

func (*RsyncNetworkCopier) Copy

func (r *RsyncNetworkCopier) Copy(ctx context.Context, sources []HostPath, dest HostPath, keyStore sshkeys.KeyStore, knownHosts sshkeys.KnownHosts) error

Jump to

Keyboard shortcuts

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