rclone

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: BSD-2-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(s string) (interface{}, error)

ParseConfig parses the string s and extracts the remote server URL.

Types

type Addr

type Addr struct{}

Addr implements net.Addr for stdin/stdout.

func (Addr) Network

func (a Addr) Network() string

Network returns the network type as a string.

func (Addr) String

func (a Addr) String() string

type Backend

type Backend struct {
	*rest.Backend
	// contains filtered or unexported fields
}

Backend is used to access data stored somewhere via rclone.

func Create

func Create(cfg Config) (*Backend, error)

Create initializes a new restic repo with clone.

func New

func New(cfg Config, lim limiter.Limiter) (*Backend, error)

New initializes a Backend and starts the process.

func Open

func Open(cfg Config, lim limiter.Limiter) (*Backend, error)

Open starts an rclone process with the given config.

func (*Backend) Close

func (be *Backend) Close() error

Close terminates the backend.

type Config

type Config struct {
	Program     string `option:"program" help:"path to rclone (default: rclone)"`
	Args        string `option:"args"    help:"arguments for running rclone (default: serve restic --stdio --b2-hard-delete --drive-use-trash=false)"`
	Remote      string
	Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
}

Config contains all configuration necessary to start rclone.

func NewConfig

func NewConfig() Config

NewConfig returns a new Config with the default values filled in.

type StdioConn

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

StdioConn implements a net.Conn via stdin/stdout.

func (*StdioConn) Close

func (s *StdioConn) Close() (err error)

Close closes both streams.

func (*StdioConn) LocalAddr

func (s *StdioConn) LocalAddr() net.Addr

LocalAddr returns nil.

func (*StdioConn) Read

func (s *StdioConn) Read(p []byte) (int, error)

func (*StdioConn) RemoteAddr

func (s *StdioConn) RemoteAddr() net.Addr

RemoteAddr returns nil.

func (*StdioConn) SetDeadline

func (s *StdioConn) SetDeadline(t time.Time) error

SetDeadline sets the read/write deadline.

func (*StdioConn) SetReadDeadline

func (s *StdioConn) SetReadDeadline(t time.Time) error

SetReadDeadline sets the read/write deadline.

func (*StdioConn) SetWriteDeadline

func (s *StdioConn) SetWriteDeadline(t time.Time) error

SetWriteDeadline sets the read/write deadline.

func (*StdioConn) Write

func (s *StdioConn) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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