Documentation ¶
Index ¶
- Constants
- Variables
- func Check(chSync chan CheckEntry, ce CheckEntry)
- func Cmd(action string, se interface{}, command string, retry bool) (string, error)
- func Debug(se interface{}, msg ...interface{})
- func FormatFileName(name string) string
- func Import(ee EventEntry)
- func Listen()
- func Normal(se interface{}, msg ...interface{})
- func Pull(ee EventEntry)
- func Push(ee EventEntry)
- func Recv(timeout time.Duration) (err error)
- func Rsync(ee EventEntry)
- func Send(ee EventEntry)
- func Sh(ee EventEntry)
- func Warning(se interface{}, msg ...interface{})
- func Watch(chSync chan CheckEntry, timeout time.Duration)
- type CheckEntry
- type Cmdcli
- type Event
- type EventEntry
- type Ftpcli
- type Logger
- type RsyncEntry
- type Rsynccli
- type SyncEntry
- func (se SyncEntry) GetCostTime() float64
- func (se *SyncEntry) GetCurrentSyncTime() (int64, error)
- func (se SyncEntry) GetLastPullTime() int64
- func (se SyncEntry) GetLastSyncTime() int64
- func (se *SyncEntry) GetSyncEndTime() (int64, error)
- func (se *SyncEntry) GetYesterdaySyncTime() int64
- func (se *SyncEntry) RestCostTime()
- func (se SyncEntry) UpdateLastPullTime(lastPullTime string)
- func (se SyncEntry) UpdateLastSyncTime()
Constants ¶
View Source
const ( NONE int = iota WARNING NORMAL DEBUG )
Variables ¶
Functions ¶
func Check ¶
func Check(chSync chan CheckEntry, ce CheckEntry)
func FormatFileName ¶
func Import ¶
func Import(ee EventEntry)
func Pull ¶
func Pull(ee EventEntry)
func Push ¶
func Push(ee EventEntry)
func Rsync ¶
func Rsync(ee EventEntry)
func Send ¶
func Send(ee EventEntry)
func Sh ¶
func Sh(ee EventEntry)
func Watch ¶
func Watch(chSync chan CheckEntry, timeout time.Duration)
Types ¶
type CheckEntry ¶
type Cmdcli ¶
type Event ¶
type Event func(EventEntry)
type EventEntry ¶
type Ftpcli ¶
type Logger ¶
type Logger struct { Level int Path string NeedRsync bool RsyncCD int RsyncHost string RsyncPort string RsyncUsername string RsyncPasswd string RsyncPath string RsyncCode string RsyncName string }
var DefLogger *Logger
func (Logger) ReadyRsync ¶
type RsyncEntry ¶
type Rsynccli ¶
type Rsynccli struct { Se SyncEntry Code string Host string Port string Username string Passwd string Path string LocalPath string File string LocalFile string SyncTime string }
func NewRsynccli ¶
type SyncEntry ¶
type SyncEntry struct { Conf string Supname string Code string LogPath string Method string SyncTime string SyncEndTime string SyncNext map[string]SyncEntry LastSyncTime int64 // contains filtered or unexported fields }
func NewSyncEntry ¶
func (SyncEntry) GetCostTime ¶
func (*SyncEntry) GetCurrentSyncTime ¶
func (SyncEntry) GetLastPullTime ¶
func (SyncEntry) GetLastSyncTime ¶
func (*SyncEntry) GetSyncEndTime ¶
func (*SyncEntry) GetYesterdaySyncTime ¶
func (*SyncEntry) RestCostTime ¶
func (se *SyncEntry) RestCostTime()
func (SyncEntry) UpdateLastPullTime ¶
func (SyncEntry) UpdateLastSyncTime ¶
func (se SyncEntry) UpdateLastSyncTime()
Click to show internal directories.
Click to hide internal directories.