Documentation ¶
Overview ¶
Package config contains: local.go - server.go - signal.go - syslog.go - version.go
Local reads and extracts the information JSON configuration file ¶
Package config contains: local.go - server.go - signal.go - syslog.go - version.go
Server keeps the struct of server json file and extracts all data ¶
Package config contains: local.go - server.go - signal.go - syslog.go - version.go
Signal gets the process ID of zeplic and sends to the process SIGTERM/SIGHUP
Package config contains: local.go - server.go - signal.go - syslog.go - version.go
Syslog establishes a new connection with the syslog daemon and writes in the log file, all messages return by the functions
Package config contains: local.go - server.go - signal.go - syslog.go - version.go
Version gets the commit version and date of last zeplic build
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // LogService returns the writer of syslog LogService *syslog.Writer // SyslogFilePath returns the path of syslog config file SyslogFilePath string // Facility applies the priority Facility syslog.Priority )
var ( // BuildTime gets date of last build BuildTime string // Commit gets the last commit Commit string // Version show the version of zeplic Version string )
var LocalFilePath string
LocalFilePath returns the path of JSON config file
var PidFilePath string
PidFilePath gets the path of pid file
var ServerFilePath string
ServerFilePath returns the path of JSON config file
Functions ¶
Types ¶
type Actions ¶
type Actions struct { Hostname string `json:"hostname"` Dataset string `json:"dataset"` Backup Cold Sync Hot RollbackIfNeeded bool `json:"rollback_if_needed"` SkipIfRenamed bool `json:"skip_if_renamed"` SkipIfNotWritten bool `json:"skip_if_not_written"` SkipIfCloned bool `json:"skip_if_cloned"` }
Actions contains the information of replicate every snapshot
type Cold ¶
type Cold struct { Prefix string `json:"prefix"` Creation string `json:"creation"` SyncOn string `json:"sync_on"` SyncDataset string `json:"sync_dataset"` SyncPolicy string `json:"sync_policy"` Retention []string `json:"retention"` }
Cold contains the information of backup snapshot
type Config ¶
type Config struct { Resync []string `json:"consul_resync"` Datacenter string `json:"datacenter"` Director []Actions `json:"datasets"` }
Config extracts the interface of JSON server file
type Copy ¶
type Copy struct { Enable bool `json:"enable"` Name string `json:"name"` Delete bool `json:"delete"` }
Copy contains Clone options
type Data ¶
type Data struct { Enable bool `json:"enable"` Slave bool `json:"slave"` Name string `json:"name"` Consul Sync Prefix string `json:"snap_prefix"` Retention int `json:"snap_retention"` Backup bool `json:"backup"` Clone Copy }
Data contains the information of each dataset
type Hot ¶
type Hot struct { Prefix string `json:"prefix"` Creation string `json:"creation"` SyncOn string `json:"sync_on"` SyncDataset string `json:"sync_dataset"` SyncPolicy string `json:"sync_policy"` Retention []string `json:"retention"` }
Hot contains the information of synchronization snapshot