rsync

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package rsync is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingRsync = errors.New("an 'rsync' command is required but could not be found")

ErrMissingRsync for use when rsync command cannot be found.

Functions

func Arguments added in v1.3.0

func Arguments(ctx context.Context, args args.Config) []string

Arguments converts the args.Config struct back into an argument vector.

Types

type Interface

type Interface interface {
	// Exec will prepare and execute an rsync command according to the configuration
	// and arguments passed into exodus-rsync.
	//
	// Note that the command is run using the execve syscall, meaning that it
	// *replaces* the current process. It never returns, unless an error occurs.
	Exec(context.Context, args.Config) error

	// RawExec will execute an rsync command with no argument parsing or configuration,
	// simply passing the raw arguments through to real rsync, /usr/bin/rsync.
	RawExec(context.Context, []string) error

	// Command will prepare and return an os.exec Cmd struct for invoking rsync.
	//
	// Only Path and Args are filled in. Other elements such as stdout, stderr
	// can be set up by the caller prior to invoking the command.
	Command(context.Context, []string) (*exec.Cmd, error)
}

Interface defines the public interface of this package.

var Package Interface = impl{}

Package provides the default implementation of this package's interface.

type MockInterface

type MockInterface struct {
	// contains filtered or unexported fields
}

MockInterface is a mock of Interface interface.

func NewMockInterface

func NewMockInterface(ctrl *gomock.Controller) *MockInterface

NewMockInterface creates a new mock instance.

func (*MockInterface) Command added in v0.2.0

func (m *MockInterface) Command(arg0 context.Context, arg1 []string) (*exec.Cmd, error)

Command mocks base method.

func (*MockInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInterface) Exec

func (m *MockInterface) Exec(arg0 context.Context, arg1 args.Config) error

Exec mocks base method.

func (*MockInterface) RawExec added in v1.3.0

func (m *MockInterface) RawExec(arg0 context.Context, arg1 []string) error

RawExec mocks base method.

type MockInterfaceMockRecorder

type MockInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockInterfaceMockRecorder is the mock recorder for MockInterface.

func (*MockInterfaceMockRecorder) Command added in v0.2.0

func (mr *MockInterfaceMockRecorder) Command(arg0, arg1 interface{}) *gomock.Call

Command indicates an expected call of Command.

func (*MockInterfaceMockRecorder) Exec

func (mr *MockInterfaceMockRecorder) Exec(arg0, arg1 interface{}) *gomock.Call

Exec indicates an expected call of Exec.

func (*MockInterfaceMockRecorder) RawExec added in v1.3.0

func (mr *MockInterfaceMockRecorder) RawExec(arg0, arg1 interface{}) *gomock.Call

RawExec indicates an expected call of RawExec.

Jump to

Keyboard shortcuts

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