sync

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: Apache-2.0 Imports: 22 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

Index

Constants

View Source
const EndAck string = "DONE"

EndAck signals to the user that the sync process is done

View Source
const ErrorAck string = "ERROR"

ErrorAck signals to the user that an error occurred

View Source
const IsDirectory uint64 = 040000

IsDirectory is a constant that can be used to determine whether a file is a folder

View Source
const IsRegularFile uint64 = 0100000

IsRegularFile is a constant that can be used to determine whether a file is a regular file

View Source
const IsSymbolicLink uint64 = 0120000

IsSymbolicLink is a constant that can be used to determine whether a file is a symbolic link

View Source
const StartAck string = "START"

StartAck signals to the user that the sync process is starting

Variables

This section is empty.

Functions

func CopyToContainer

func CopyToContainer(Kubectl *kubernetes.Clientset, Pod *k8sv1.Pod, Container *k8sv1.Container, LocalPath, ContainerPath string, ExcludePaths []string) error

CopyToContainer copies a local folder to a container path

Types

type SyncConfig

type SyncConfig struct {
	Kubectl              *kubernetes.Clientset
	Pod                  *k8sv1.Pod
	Container            *k8sv1.Container
	WatchPath            string
	DestPath             string
	ExcludePaths         []string
	DownloadExcludePaths []string
	UploadExcludePaths   []string
	Verbose              bool
	// contains filtered or unexported fields
}

SyncConfig holds the necessary information for the syncing process

func (*SyncConfig) Error added in v0.2.0

func (s *SyncConfig) Error(err error)

Error handles a sync error with context

func (*SyncConfig) Logf

func (s *SyncConfig) Logf(format string, args ...interface{})

Logf prints the given information to the synclog with context data

func (*SyncConfig) Logln

func (s *SyncConfig) Logln(line interface{})

Logln prints the given information to the synclog with context data

func (*SyncConfig) Start

func (s *SyncConfig) Start() error

Start starts a new sync instance

func (*SyncConfig) Stop

func (s *SyncConfig) Stop(fatalError error)

Stop stops the sync process

Jump to

Keyboard shortcuts

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