remote_comms_facade

package
v0.0.0-...-ea1f910 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Facade

type Facade interface {
	Ping() error
	ConfirmVersionMatch(version string) error

	GetTempDir() (string, error)
	GetOsType() (osvisitors.OsType, error)

	// Start() (*StartedDetails, error)
	StartDetached(workingDir string, commandLine ...string) (*StartedDetails, error)

	CheckPathsAreInSync(logger logger.Logger, localPath, remotePath string) (bool, error)

	Upload(localPath, remotePath string) error
	DownloadDir(remotePath, localPath string) error

	ReadFileContent(remotePath string) ([]byte, error)
	UploadFileContent(remotePath string, content []byte) error

	Stats(remotePath string) (*dtos.StatsDto, error)
	Copy(srcRemotePath, destRemotePath string) error
	Symlink(srcRemotePath, destRemoteSymlinkPath string) error
	Move(oldRemotePath, newRemotePath string) error

	Delete(remotePath string) error
}

type Factory

type Factory interface {
	NewFacade(hostDetails host_details.HostDetails) Facade
}

Factory will create instances of Facade

func NewFactory

func NewFactory(logger logger.Logger, gopsexecClient *gpClient.Client, filepathSummaryService filepath_summary.Service) Factory

NewFactory creates a new Factory instance

type Result

type Result struct {
	FeedbackLines []string
	Errors        []error
}

func (*Result) AppendError

func (r *Result) AppendError(err error)

func (*Result) AppendFeedback

func (r *Result) AppendFeedback(feedback string)

func (*Result) CombinedErrorLines

func (r *Result) CombinedErrorLines() string

func (*Result) CombinedFeedbackLines

func (r *Result) CombinedFeedbackLines() string

func (*Result) ErrorStrings

func (r *Result) ErrorStrings() (errStrs []string)

type StartedDetails

type StartedDetails struct {
	Pid          int
	FeedbackChan <-chan string
	ErrorChan    <-chan error
}

func (*StartedDetails) Wait

func (s *StartedDetails) Wait() *Result

Jump to

Keyboard shortcuts

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