sync

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2018 License: Apache-2.0 Imports: 22 Imported by: 1

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
	// 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()

Stop stops the sync process

Jump to

Keyboard shortcuts

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