gosync

package module
v0.0.0-...-a9df0e9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: MIT Imports: 17 Imported by: 0

README

gosync

A sync tools by golang. Sync files from one node to one or more nodes.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client()

func DeamonStart

func DeamonStart()

func DefaultSync

func DefaultSync(mg *Message, targets []string) []*result

func RandId

func RandId() int

func Zipfiles

func Zipfiles(f string) (string, error)

Types

type Message

type Message struct {
	MgID      int    // reserved
	MgType    string // cmd,auth,file,info,task
	MgName    string // cmd name, auth username, file name, info name, task: DefaultSync/UpdateSync
	MgByte    []byte // file piece
	MgString  string // cmd option, autho user passwd, sync task target hosts
	IntOption int    // file piece number or other
	StrOption string // start, continue, end
	SrcPath   string // src file path or task src path
	DstPath   string // dst file path or task dst path
	Del       bool   // whether should the not exist files in src be deleted.
	Zip       bool   // whether should files be compressed.
	Overwrt   bool   // whether the conflicted files be overwrited.
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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