sync

package
Version: v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(client SyncClient, localPath string, compInfo common.ComponentInfo, targetPath string, copyFiles []string, globExps []string) error

CopyFile copies localPath directory or list of files in copyFiles list to the directory in running Pod. copyFiles is list of changed files captured during `odo watch` as well as binary file path During copying binary components, localPath represent base directory path to binary and copyFiles contains path of binary During copying local source components, localPath represent base directory path whereas copyFiles is empty During `odo watch`, localPath represent base directory path whereas copyFiles contains list of changed Files

Types

type Adapter added in v1.2.0

type Adapter struct {
	Client SyncClient
	common.AdapterContext
}

Adapter is a component adapter implementation for sync

func New added in v1.2.0

func New(adapterContext common.AdapterContext, client SyncClient) Adapter

New instantiantes a component adapter

func (Adapter) SyncFiles added in v1.2.0

func (a Adapter) SyncFiles(syncParameters common.SyncParameters) (isPushRequired bool, err error)

SyncFiles does a couple of things: if files changed/deleted are passed in from watch, it syncs them to the component otherwise, it checks which files have changed and syncs the delta it returns a boolean execRequired and an error. execRequired tells us if files have changed and devfile execution is required

type SyncClient

type SyncClient interface {
	ExecCMDInContainer(common.ComponentInfo, []string, io.Writer, io.Writer, io.Reader, bool) error
	ExtractProjectToComponent(common.ComponentInfo, string, io.Reader) error
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL