...

Source file src/github.com/redhat-developer/odo/pkg/sync/interface.go

Documentation: github.com/redhat-developer/odo/pkg/sync

     1  package sync
     2  
     3  import (
     4  	"context"
     5  	"io"
     6  )
     7  
     8  // ComponentInfo is a struct that holds information about a component i.e.; component name, pod name, container name, and source mount (if applicable)
     9  type ComponentInfo struct {
    10  	ComponentName string
    11  	PodName       string
    12  	ContainerName string
    13  	SyncFolder    string
    14  }
    15  
    16  type SyncExtracter func(ComponentInfo, string, io.Reader) error
    17  
    18  // SyncParameters is a struct containing the parameters to be used when syncing a devfile component
    19  type SyncParameters struct {
    20  	Path                     string   // Path refers to the parent folder containing the source code to push up to a component
    21  	WatchFiles               []string // Optional: WatchFiles is the list of changed files detected by odo watch. If empty or nil, odo will check .odo/odo-file-index.json to determine changed files
    22  	WatchDeletedFiles        []string // Optional: WatchDeletedFiles is the list of deleted files detected by odo watch. If empty or nil, odo will check .odo/odo-file-index.json to determine deleted files
    23  	IgnoredFiles             []string // IgnoredFiles is the list of files to not push up to a component
    24  	DevfileScanIndexForWatch bool     // DevfileScanIndexForWatch is true if watch's push should regenerate the index file during SyncFiles, false otherwise. See 'pkg/sync/adapter.go' for details
    25  	ForcePush                bool
    26  	CompInfo                 ComponentInfo
    27  	Files                    map[string]string
    28  }
    29  
    30  type Client interface {
    31  	SyncFiles(ctx context.Context, syncParameters SyncParameters) (bool, error)
    32  }
    33  

View as plain text