Documentation ¶
Index ¶
- Constants
- Variables
- func RandomTime(delay float64) time.Duration
- func Run(conf Config) error
- func SetRsyncVerboseOpt(opt string) error
- type CommandLine
- type CommandLines
- type Commands
- type Config
- type ConsulEvent
- type ConsulEvents
- type Manifest
- type MvSyncStrategy
- type RsyncStrategy
- type SyncStrategy
Constants ¶
View Source
const Nanoseconds = 1000 * 1000 * 1000
Variables ¶
View Source
var ( LogBuffer bytes.Buffer Version string )
View Source
var ( RsyncDefaultOpts = []string{"-a", "--delete"} RsyncVerboseOpt = "-v" )
View Source
var DefaultDestMode = os.FileMode(0755)
Functions ¶
func RandomTime ¶ added in v0.4.2
func SetRsyncVerboseOpt ¶ added in v0.9.0
Types ¶
type CommandLine ¶ added in v0.0.4
type CommandLine string
func (CommandLine) Invoke ¶ added in v0.0.4
func (c CommandLine) Invoke() error
func (CommandLine) InvokePipe ¶ added in v0.0.4
func (c CommandLine) InvokePipe(src io.Reader) error
func (CommandLine) String ¶ added in v0.0.4
func (c CommandLine) String() string
type CommandLines ¶ added in v0.0.4
type CommandLines []CommandLine
func (CommandLines) Invoke ¶ added in v0.0.4
func (cs CommandLines) Invoke() error
func (CommandLines) InvokePipe ¶ added in v0.0.4
func (cs CommandLines) InvokePipe(src *bytes.Buffer) error
type Commands ¶
type Commands struct { Pre CommandLines `yaml:"pre"` Post CommandLines `yaml:"post"` Success CommandLines `yaml:"success"` Failure CommandLines `yaml:"failure"` }
type ConsulEvent ¶
type ConsulEvent struct { ID string `json:"ID"` Name string `json:"Name"` Payload []byte `json:"Payload"` LTime int `json:"LTime"` }
func ParseConsulEvents ¶
func ParseConsulEvents(in io.Reader) (*ConsulEvent, error)
type ConsulEvents ¶
type ConsulEvents []ConsulEvent
type Manifest ¶
type Manifest struct { Src string `yaml:"src"` CheckSum string `yaml:"checksum"` Dest string `yaml:"dest"` DestMode *os.FileMode `yaml:"dest_mode"` Commands Commands `yaml:"commands"` Excludes []string `yaml:"excludes"` ExcludeFrom string `yaml:"exclude_from"` SyncStrategy string `yaml:"sync_strategy"` }
func ParseManifest ¶
type MvSyncStrategy ¶ added in v0.6.0
type MvSyncStrategy struct { }
func (*MvSyncStrategy) Sync ¶ added in v0.6.0
func (s *MvSyncStrategy) Sync(from, to string) error
type RsyncStrategy ¶ added in v0.6.0
type RsyncStrategy struct {
*Manifest
}
func (*RsyncStrategy) Sync ¶ added in v0.6.0
func (s *RsyncStrategy) Sync(from, to string) error
type SyncStrategy ¶ added in v0.6.0
func NewSyncStrategy ¶ added in v0.6.0
func NewSyncStrategy(m *Manifest) (SyncStrategy, error)
Click to show internal directories.
Click to hide internal directories.