sync

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

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 Symlink struct {
	SymlinkPath string
	TargetPath  string

	IsDir bool
	// contains filtered or unexported fields
}

Symlink holds information about a symlink

func NewSymlink(upstream *upstream, symlinkPath, targetPath string, isDir bool) (*Symlink, error)

NewSymlink creates a new symlink object

func (*Symlink) Crawl

func (s *Symlink) Crawl() error

Crawl resolves the symlink and sends an event for each file in the target path

func (*Symlink) Stop

func (s *Symlink) Stop()

Stop stops watching on the watching path

type SyncConfig

type SyncConfig struct {
	Kubectl              *kubernetes.Clientset
	Pod                  *k8sv1.Pod
	Container            *k8sv1.Container
	WatchPath            string
	DestPath             string
	ExcludePaths         []string
	DownloadExcludePaths []string
	UploadExcludePaths   []string
	UpstreamLimit        int64
	DownstreamLimit      int64
	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