Documentation
¶
Index ¶
- Constants
- Variables
- func Default(i interface{})
- type ActiveJob
- type Config
- type ConnectCommon
- type ConnectEnum
- type FilesystemsFilter
- type Global
- type GlobalControl
- type GlobalServe
- type GlobalStdinServer
- type HookCommand
- type HookEnum
- type HookList
- type HookMySQLLockTables
- type HookPostgresCheckpoint
- type HookSettingsCommon
- type JobDebugSettings
- type JobEnum
- type LocalConnect
- type LocalServe
- type LoggingOutletCommon
- type LoggingOutletEnum
- type LoggingOutletEnumList
- type MonitoringEnum
- type PassiveJob
- type PositiveDurationOrManual
- type PrometheusMonitoring
- type PropertyRecvOptions
- type PruneGrid
- type PruneKeepLastN
- type PruneKeepNotReplicated
- type PruneKeepRegex
- type PruningEnum
- type PruningLocal
- type PruningSenderReceiver
- type PullJob
- type PushJob
- type RecvOptions
- type Replication
- type ReplicationOptionsConcurrency
- type ReplicationOptionsProtection
- type RetentionInterval
- type RetentionIntervalList
- type SSHStdinserverConnect
- type SendOptions
- type ServeCommon
- type ServeEnum
- type SinkJob
- type SnapJob
- type SnapshottingEnum
- type SnapshottingManual
- type SnapshottingPeriodic
- type SourceJob
- type StdinserverServer
- type StdoutLoggingOutlet
- type SyslogFacility
- type SyslogLoggingOutlet
- type TCPConnect
- type TCPLoggingOutlet
- type TCPLoggingOutletTLS
- type TCPServe
- type TLSConnect
- type TLSServe
Constants ¶
View Source
const RetentionGridKeepCountAll int = -1
Variables ¶
View Source
var ConfigFileDefaultLocations = []string{
"/etc/zrepl/zrepl.yml",
"/usr/local/etc/zrepl/zrepl.yml",
}
Functions ¶
Types ¶
type ActiveJob ¶
type ActiveJob struct {
Type string `yaml:"type"`
Name string `yaml:"name"`
Connect ConnectEnum `yaml:"connect"`
Pruning PruningSenderReceiver `yaml:"pruning"`
Debug JobDebugSettings `yaml:"debug,optional"`
Replication *Replication `yaml:"replication,optional,fromdefaults"`
}
type Config ¶
type Config struct {
Jobs []JobEnum `yaml:"jobs"`
Global *Global `yaml:"global,optional,fromdefaults"`
}
func ParseConfig ¶
func ParseConfigBytes ¶
type ConnectCommon ¶
type ConnectCommon struct {
Type string `yaml:"type"`
}
type ConnectEnum ¶
type ConnectEnum struct {
Ret interface{}
}
func (*ConnectEnum) UnmarshalYAML ¶
func (t *ConnectEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type FilesystemsFilter ¶
type Global ¶
type Global struct {
Logging *LoggingOutletEnumList `yaml:"logging,optional,fromdefaults"`
Monitoring []MonitoringEnum `yaml:"monitoring,optional"`
Control *GlobalControl `yaml:"control,optional,fromdefaults"`
Serve *GlobalServe `yaml:"serve,optional,fromdefaults"`
}
type GlobalControl ¶
type GlobalControl struct {
SockPath string `yaml:"sockpath,default=/var/run/zrepl/control"`
}
type GlobalServe ¶
type GlobalServe struct {
StdinServer *GlobalStdinServer `yaml:"stdinserver,optional,fromdefaults"`
}
type GlobalStdinServer ¶
type GlobalStdinServer struct {
SockDir string `yaml:"sockdir,default=/var/run/zrepl/stdinserver"`
}
type HookCommand ¶ added in v0.2.0
type HookCommand struct {
Path string `yaml:"path"`
Timeout time.Duration `yaml:"timeout,optional,positive,default=30s"`
Filesystems FilesystemsFilter `yaml:"filesystems,optional,default={'<': true}"`
HookSettingsCommon `yaml:",inline"`
}
type HookMySQLLockTables ¶ added in v0.2.0
type HookMySQLLockTables struct {
HookSettingsCommon `yaml:",inline"`
DSN string `yaml:"dsn"`
Timeout time.Duration `yaml:"timeout,optional,positive,default=30s"`
Filesystems FilesystemsFilter `yaml:"filesystems"`
}
type HookPostgresCheckpoint ¶ added in v0.2.0
type HookPostgresCheckpoint struct {
HookSettingsCommon `yaml:",inline"`
DSN string `yaml:"dsn"`
Timeout time.Duration `yaml:"timeout,optional,positive,default=30s"`
Filesystems FilesystemsFilter `yaml:"filesystems"` // required, user should not CHECKPOINT for every FS
}
type HookSettingsCommon ¶ added in v0.2.0
type JobDebugSettings ¶
type LocalConnect ¶
type LocalConnect struct {
ConnectCommon `yaml:",inline"`
ListenerName string `yaml:"listener_name"`
ClientIdentity string `yaml:"client_identity"`
DialTimeout time.Duration `yaml:"dial_timeout,zeropositive,default=2s"`
}
type LocalServe ¶
type LocalServe struct {
ServeCommon `yaml:",inline"`
ListenerName string `yaml:"listener_name"`
}
type LoggingOutletCommon ¶
type LoggingOutletEnum ¶
type LoggingOutletEnum struct {
Ret interface{}
}
func (*LoggingOutletEnum) UnmarshalYAML ¶
func (t *LoggingOutletEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type LoggingOutletEnumList ¶
type LoggingOutletEnumList []LoggingOutletEnum
func (*LoggingOutletEnumList) SetDefault ¶
func (l *LoggingOutletEnumList) SetDefault()
type MonitoringEnum ¶
type MonitoringEnum struct {
Ret interface{}
}
func (*MonitoringEnum) UnmarshalYAML ¶
func (t *MonitoringEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type PassiveJob ¶
type PassiveJob struct {
Type string `yaml:"type"`
Name string `yaml:"name"`
Serve ServeEnum `yaml:"serve"`
Debug JobDebugSettings `yaml:"debug,optional"`
}
type PositiveDurationOrManual ¶
func (*PositiveDurationOrManual) UnmarshalYAML ¶
func (i *PositiveDurationOrManual) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type PrometheusMonitoring ¶
type PropertyRecvOptions ¶ added in v0.4.0
type PruneGrid ¶
type PruneGrid struct {
Type string `yaml:"type"`
Grid RetentionIntervalList `yaml:"grid"`
Regex string `yaml:"regex"`
}
type PruneKeepLastN ¶
type PruneKeepNotReplicated ¶
type PruneKeepRegex ¶
type PruningEnum ¶
type PruningEnum struct {
Ret interface{}
}
func (*PruningEnum) UnmarshalYAML ¶
func (t *PruningEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type PruningLocal ¶
type PruningLocal struct {
Keep []PruningEnum `yaml:"keep"`
}
type PruningSenderReceiver ¶
type PruningSenderReceiver struct {
KeepSender []PruningEnum `yaml:"keep_sender"`
KeepReceiver []PruningEnum `yaml:"keep_receiver"`
}
type PullJob ¶
type PullJob struct {
ActiveJob `yaml:",inline"`
RootFS string `yaml:"root_fs"`
Interval PositiveDurationOrManual `yaml:"interval"`
Recv *RecvOptions `yaml:"recv,fromdefaults,optional"`
}
func (*PullJob) GetAppendClientIdentity ¶ added in v0.3.0
func (*PullJob) GetRecvOptions ¶ added in v0.3.0
func (j *PullJob) GetRecvOptions() *RecvOptions
type PushJob ¶
type PushJob struct {
ActiveJob `yaml:",inline"`
Snapshotting SnapshottingEnum `yaml:"snapshotting"`
Filesystems FilesystemsFilter `yaml:"filesystems"`
Send *SendOptions `yaml:"send,fromdefaults,optional"`
}
func (*PushJob) GetFilesystems ¶ added in v0.3.0
func (j *PushJob) GetFilesystems() FilesystemsFilter
func (*PushJob) GetSendOptions ¶ added in v0.3.0
func (j *PushJob) GetSendOptions() *SendOptions
type RecvOptions ¶ added in v0.3.0
type RecvOptions struct {
Properties *PropertyRecvOptions `yaml:"properties,fromdefaults"`
}
func (*RecvOptions) SetDefault ¶ added in v0.4.0
func (l *RecvOptions) SetDefault()
type Replication ¶ added in v0.3.0
type Replication struct {
Protection *ReplicationOptionsProtection `yaml:"protection,optional,fromdefaults"`
Concurrency *ReplicationOptionsConcurrency `yaml:"concurrency,optional,fromdefaults"`
}
type ReplicationOptionsConcurrency ¶ added in v0.4.0
type ReplicationOptionsProtection ¶ added in v0.3.0
type RetentionInterval ¶
type RetentionInterval struct {
// contains filtered or unexported fields
}
func ParseRetentionIntervalSpec ¶ added in v0.3.1
func ParseRetentionIntervalSpec(s string) (intervals []RetentionInterval, err error)
func (*RetentionInterval) KeepCount ¶
func (i *RetentionInterval) KeepCount() int
func (*RetentionInterval) Length ¶
func (i *RetentionInterval) Length() time.Duration
type RetentionIntervalList ¶
type RetentionIntervalList []RetentionInterval
func (*RetentionIntervalList) UnmarshalYAML ¶
func (t *RetentionIntervalList) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type SSHStdinserverConnect ¶
type SSHStdinserverConnect struct {
ConnectCommon `yaml:",inline"`
Host string `yaml:"host"`
User string `yaml:"user"`
Port uint16 `yaml:"port"`
IdentityFile string `yaml:"identity_file"`
TransportOpenCommand []string `yaml:"transport_open_command,optional"` //TODO unused
SSHCommand string `yaml:"ssh_command,optional"` //TODO unused
Options []string `yaml:"options,optional"`
DialTimeout time.Duration `yaml:"dial_timeout,zeropositive,default=10s"`
}
type SendOptions ¶ added in v0.3.0
type SendOptions struct {
Encrypted bool `yaml:"encrypted,optional,default=false"`
Raw bool `yaml:"raw,optional,default=false"`
SendProperties bool `yaml:"send_properties,optional,default=false"`
BackupProperties bool `yaml:"backup_properties,optional,default=false"`
LargeBlocks bool `yaml:"large_blocks,optional,default=false"`
Compressed bool `yaml:"compressed,optional,default=false"`
EmbeddedData bool `yaml:"embbeded_data,optional,default=false"`
Saved bool `yaml:"saved,optional,default=false"`
}
type ServeCommon ¶
type ServeCommon struct {
Type string `yaml:"type"`
}
type SinkJob ¶
type SinkJob struct {
PassiveJob `yaml:",inline"`
RootFS string `yaml:"root_fs"`
Recv *RecvOptions `yaml:"recv,optional,fromdefaults"`
}
func (*SinkJob) GetAppendClientIdentity ¶ added in v0.3.0
func (*SinkJob) GetRecvOptions ¶ added in v0.3.0
func (j *SinkJob) GetRecvOptions() *RecvOptions
type SnapJob ¶
type SnapJob struct {
Type string `yaml:"type"`
Name string `yaml:"name"`
Pruning PruningLocal `yaml:"pruning"`
Debug JobDebugSettings `yaml:"debug,optional"`
Snapshotting SnapshottingEnum `yaml:"snapshotting"`
Filesystems FilesystemsFilter `yaml:"filesystems"`
}
type SnapshottingEnum ¶
type SnapshottingEnum struct {
Ret interface{}
}
func (*SnapshottingEnum) UnmarshalYAML ¶
func (t *SnapshottingEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type SnapshottingManual ¶
type SnapshottingManual struct {
Type string `yaml:"type"`
}
type SnapshottingPeriodic ¶
type SourceJob ¶
type SourceJob struct {
PassiveJob `yaml:",inline"`
Snapshotting SnapshottingEnum `yaml:"snapshotting"`
Filesystems FilesystemsFilter `yaml:"filesystems"`
Send *SendOptions `yaml:"send,optional,fromdefaults"`
}
func (*SourceJob) GetFilesystems ¶ added in v0.3.0
func (j *SourceJob) GetFilesystems() FilesystemsFilter
func (*SourceJob) GetSendOptions ¶ added in v0.3.0
func (j *SourceJob) GetSendOptions() *SendOptions
type StdinserverServer ¶
type StdinserverServer struct {
ServeCommon `yaml:",inline"`
ClientIdentities []string `yaml:"client_identities"`
}
type StdoutLoggingOutlet ¶
type StdoutLoggingOutlet struct {
LoggingOutletCommon `yaml:",inline"`
Time bool `yaml:"time,default=true"`
Color bool `yaml:"color,default=true"`
}
type SyslogFacility ¶
func (*SyslogFacility) SetDefault ¶
func (f *SyslogFacility) SetDefault()
func (*SyslogFacility) UnmarshalYAML ¶
func (t *SyslogFacility) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type SyslogLoggingOutlet ¶
type SyslogLoggingOutlet struct {
LoggingOutletCommon `yaml:",inline"`
Facility *SyslogFacility `yaml:"facility,optional,fromdefaults"`
RetryInterval time.Duration `yaml:"retry_interval,positive,default=10s"`
}
type TCPConnect ¶
type TCPConnect struct {
ConnectCommon `yaml:",inline"`
Address string `yaml:"address,hostport"`
DialTimeout time.Duration `yaml:"dial_timeout,zeropositive,default=10s"`
}
type TCPLoggingOutlet ¶
type TCPLoggingOutlet struct {
LoggingOutletCommon `yaml:",inline"`
Address string `yaml:"address,hostport"`
Net string `yaml:"net,default=tcp"`
RetryInterval time.Duration `yaml:"retry_interval,positive,default=10s"`
TLS *TCPLoggingOutletTLS `yaml:"tls,optional"`
}
type TCPLoggingOutletTLS ¶
type TCPServe ¶
type TCPServe struct {
ServeCommon `yaml:",inline"`
Listen string `yaml:"listen,hostport"`
ListenFreeBind bool `yaml:"listen_freebind,default=false"`
Clients map[string]string `yaml:"clients"`
}
type TLSConnect ¶
type TLSServe ¶
type TLSServe struct {
ServeCommon `yaml:",inline"`
Listen string `yaml:"listen,hostport"`
ListenFreeBind bool `yaml:"listen_freebind,default=false"`
Ca string `yaml:"ca"`
Cert string `yaml:"cert"`
Key string `yaml:"key"`
ClientCNs []string `yaml:"client_cns"`
HandshakeTimeout time.Duration `yaml:"handshake_timeout,zeropositive,default=10s"`
}
Click to show internal directories.
Click to hide internal directories.