Documentation
¶
Index ¶
- Constants
- Variables
- func Client()
- func DeamonStart()
- func DubugInfor(a ...interface{})
- func GetLocalIP() string
- func Md5AndZip(files []string) (string, md5s, error)
- func Md5OfAFile(f string) (string, error)
- func Md5OfASlice(s []string) string
- func PrintInfor(a ...interface{})
- func RandId() int
- func TravHosts(hosts []string, fileMd5List []string, flMd5 md5s, mg *Message, ...)
- func Traverse(path string) ([]string, error)
- func Unzip(zipfile string) error
- func Zipfiles(f string) (string, error)
- type ClientRet
- type Message
- type State
- type Tasks
Constants ¶
View Source
const ( Running = true Complated = false )
Variables ¶
View Source
var DebugFlag bool
Functions ¶
func DeamonStart ¶
func DeamonStart()
func GetLocalIP ¶
func GetLocalIP() string
func Md5OfAFile ¶
func Md5OfASlice ¶
Types ¶
type Message ¶
type Message struct {
TaskID string
MgID int // reserved
MgType string // cmd,auth,file,info,task
MgName string // cmd name, auth username, file name, info name, ** del: task: DefaultSync/UpdateSync**
MgByte []byte // file piece
MgString string // cmd option, autho user passwd, sync task target hosts
MgStrings []string
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.
B bool // other bool option
M map[hostIP]ret
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.

