Version: v1.2.6 Latest Latest

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: 0




This section is empty.


This section is empty.


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


type Adapter added in v1.2.0

type Adapter struct {
	Client SyncClient

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
y or Y : Canonical URL