remote

package
v0.33.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPort

func GetPort() int

GetPort returns the port chosen by the system

func StartServer

func StartServer(done chan any) error

StartServer starts a http server

func StopServer

func StopServer(ctx context.Context)

StopServer gracefully asks the http server to shutdown

Types

type Client

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

Client for sending messages back to the parent process

func NewClient

func NewClient(port int) *Client

NewClient creates a new client to connect to localhost and port in parameter

func (*Client) Done

func (c *Client) Done() error

Done signals to the parent process that we're finished

func (*Client) LogEntry

func (c *Client) LogEntry(logEntry clog.LogEntry) error

LogEntry logs messages back to the parent process

func (*Client) SetPrefix added in v0.9.2

func (c *Client) SetPrefix(logPrefix string) clog.Handler

SetPrefix adds a prefix to all the log messages

func (*Client) Term

func (c *Client) Term(p []byte) error

Term sends plain text terminal output

type Manifest added in v0.33.0

type Manifest struct {
	Version              string // resticprofile version
	ConfigurationFile    string
	ProfileName          string
	Mountpoint           string // Mountpoint of the virtual FS if configured
	CommandLineArguments []string
}

type Tar added in v0.33.0

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

func NewTar added in v0.33.0

func NewTar(w io.Writer) *Tar

func (*Tar) Close added in v0.33.0

func (t *Tar) Close() error

func (*Tar) PrepareFiles added in v0.33.0

func (t *Tar) PrepareFiles(files []string) error

PrepareFiles stats the given files and stores their FileInfo for later use in SendFiles. This way, if a file is missing, we can return an error before starting to write the tar stream.

func (*Tar) SendFile added in v0.33.0

func (t *Tar) SendFile(name string, data []byte) error

func (*Tar) SendFiles added in v0.33.0

func (t *Tar) SendFiles() error

SendFiles sends all prepared files to the tar writer

func (*Tar) WithFs added in v0.33.0

func (t *Tar) WithFs(fs afero.Fs) *Tar

Jump to

Keyboard shortcuts

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