server

package
v1.1.1-0...-9418116 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chown

func Chown(filepath string, stat os.FileInfo) error

Chown sets the given stat owner and group id to the filepath

func StartDownstreamServer

func StartDownstreamServer(remotePath string, excludePaths []string, reader io.Reader, writer io.Writer, exitOnClose bool) error

StartDownstreamServer starts a new downstream server with the given reader and writer

func StartUpstreamServer

func StartUpstreamServer(uploadPath string, excludePaths []string, reader io.Reader, writer io.Writer, exitOnClose bool) error

StartUpstreamServer starts a new upstream server with the given reader and writer

Types

type Downstream

type Downstream struct {
	// RemotePath is the path to watch for changes
	RemotePath string
	// contains filtered or unexported fields
}

Downstream is the implementation for the downstream server

func (*Downstream) Changes

func (d *Downstream) Changes(empty *remote.Empty, stream remote.Downstream_ChangesServer) error

Changes retrieves all changes from the watchpath

func (*Downstream) ChangesCount

func (d *Downstream) ChangesCount(context.Context, *remote.Empty) (*remote.ChangeAmount, error)

ChangesCount returns the amount of changes on the remote side

func (*Downstream) Download

func (d *Downstream) Download(stream remote.Downstream_DownloadServer) error

Download sends the file at the temp download location to the client

type Upstream

type Upstream struct {
	UploadPath string
	// contains filtered or unexported fields
}

Upstream is the implementation for the upstream server

func (*Upstream) Remove

func (u *Upstream) Remove(stream remote.Upstream_RemoveServer) error

Remove implements the server

func (*Upstream) Upload

func (u *Upstream) Upload(stream remote.Upstream_UploadServer) error

Upload implements the server upload interface and writes all the data received to a temporary file

Jump to

Keyboard shortcuts

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