rsync

package
v0.0.0-...-3cc9250 Latest Latest
Warning

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

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

Documentation

Overview

Package rsync adds file server and copying client to copy files between glow driver and agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchFilesTo

func FetchFilesTo(driverAddress string, dir string) error

func FetchUrl

func FetchUrl(fileUrl string, destFile string) error

Types

type FileHash

type FileHash struct {
	FullPath     string `json:"path,omitempty"`
	TargetFolder string `json:"targetFolder,omitempty"`
	File         string `json:"file,omitempty"`
	Hash         uint32 `json:"hash,omitempty"`
}

func GenerateFileHash

func GenerateFileHash(fullpath string) (*FileHash, error)

func ListFiles

func ListFiles(server string) ([]FileHash, error)

type FileResource

type FileResource struct {
	FullPath     string `json:"path,omitempty"`
	TargetFolder string `json:"targetFolder,omitempty"`
}

type ListFileResult

type ListFileResult struct {
	Files []FileHash `json:"files,omitempty"`
}

type RsyncServer

type RsyncServer struct {
	Ip   string
	Port int

	RelatedFiles []FileResource
	// contains filtered or unexported fields
}

func NewRsyncServer

func NewRsyncServer(relatedFiles ...FileResource) (*RsyncServer, error)

func (*RsyncServer) StartRsyncServer

func (rs *RsyncServer) StartRsyncServer(listenOn string)

go start a http server locally that will respond predictably to ranged requests

Jump to

Keyboard shortcuts

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