netcopy

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 5 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 {
	// CopyTo 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) error
}

NetworkCopier copies files over the network

type RsyncNetworkCopier

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

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

func NewRsyncNetworkCopier

func NewRsyncNetworkCopier(sshPrivateKeyPath string) *RsyncNetworkCopier

func (*RsyncNetworkCopier) Copy

func (r *RsyncNetworkCopier) Copy(ctx context.Context, sources []HostPath, dest HostPath) error

Jump to

Keyboard shortcuts

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