Documentation ¶
Index ¶
- Constants
- Variables
- type ActiveJob
- type BandwidthLimit
- type Config
- type ConflictResolution
- type ConnectCommon
- type ConnectEnum
- type Duration
- type FileLoggingOutlet
- type FilesystemsFilter
- type Global
- type GlobalControl
- type GlobalServe
- type GlobalStdinServer
- type HookCommand
- type HookEnum
- type HookList
- type HookSettingsCommon
- type JobEnum
- type LocalConnect
- type LocalServe
- type LoggingOutletCommon
- type LoggingOutletEnum
- type LoggingOutletEnumList
- type MonitorSnapshot
- type MonitorSnapshots
- type MonitoringEnum
- type ParseFlags
- type PassiveJob
- type PlaceholderRecvOptions
- type PositiveDuration
- 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 ¶
This section is empty.
Types ¶
type ActiveJob ¶
type ActiveJob struct { Type string `yaml:"type"` Name string `yaml:"name"` Connect ConnectEnum `yaml:"connect"` Pruning PruningSenderReceiver `yaml:"pruning"` Replication *Replication `yaml:"replication,optional,fromdefaults"` ConflictResolution *ConflictResolution `yaml:"conflict_resolution,optional,fromdefaults"` MonitorSnapshots MonitorSnapshots `yaml:"monitor,optional"` Interval PositiveDurationOrManual `yaml:"interval,optional"` Cron string `yaml:"cron,optional"` }
type BandwidthLimit ¶ added in v0.7.4
type BandwidthLimit struct { Max datasizeunit.Bits `yaml:"max,default=-1 B"` BucketCapacity datasizeunit.Bits `yaml:"bucket_capacity,default=128 KiB"` }
type Config ¶
type Config struct { Jobs []JobEnum `yaml:"jobs,optional"` Global *Global `yaml:"global,optional,fromdefaults"` }
func ParseConfig ¶
func ParseConfigBytes ¶
type ConflictResolution ¶ added in v0.7.4
type ConflictResolution struct {
InitialReplication string `yaml:"initial_replication,optional,default=all"`
}
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 FileLoggingOutlet ¶ added in v0.7.4
type FileLoggingOutlet struct { LoggingOutletCommon `yaml:",inline"` FileName string `yaml:"filename,optional"` }
type FilesystemsFilter ¶
type Global ¶
type Global struct { RpcTimeout time.Duration `yaml:"rpc_timeout,optional"` ZfsBin string `yaml:"zfs_bin,optional"` 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.7.4
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 HookSettingsCommon ¶ added in v0.7.4
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 MonitorSnapshot ¶ added in v0.7.4
type MonitorSnapshots ¶ added in v0.7.4
type MonitorSnapshots struct { Latest []MonitorSnapshot `yaml:"latest,optional"` Oldest []MonitorSnapshot `yaml:"oldest,optional"` }
type MonitoringEnum ¶
type MonitoringEnum struct {
Ret interface{}
}
func (*MonitoringEnum) UnmarshalYAML ¶
func (t *MonitoringEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type ParseFlags ¶ added in v0.7.4
type ParseFlags uint
const ( ParseFlagsNone ParseFlags = 0 ParseFlagsNoCertCheck ParseFlags = 1 << iota )
type PassiveJob ¶
type PassiveJob struct { Type string `yaml:"type"` Name string `yaml:"name"` Serve ServeEnum `yaml:"serve"` MonitorSnapshots MonitorSnapshots `yaml:"monitor,optional"` }
type PlaceholderRecvOptions ¶ added in v0.7.4
type PlaceholderRecvOptions struct {
Encryption string `yaml:"encryption,default=inherit"`
}
type PositiveDuration ¶ added in v0.7.4
type PositiveDuration struct {
// contains filtered or unexported fields
}
func (PositiveDuration) Duration ¶ added in v0.7.4
func (d PositiveDuration) Duration() time.Duration
func (*PositiveDuration) UnmarshalYAML ¶ added in v0.7.4
func (d *PositiveDuration) UnmarshalYAML(unmarshal func(v interface{}, not_strict bool) error) error
type PositiveDurationOrManual ¶
func (*PositiveDurationOrManual) UnmarshalYAML ¶
func (i *PositiveDurationOrManual) UnmarshalYAML(u func(interface{}, bool) error) (err error)
type PrometheusMonitoring ¶
type PropertyRecvOptions ¶ added in v0.7.4
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,optional"` KeepReceiver []PruningEnum `yaml:"keep_receiver,optional"` }
type PullJob ¶
type PullJob struct { ActiveJob `yaml:",inline"` RootFS string `yaml:"root_fs"` Recv *RecvOptions `yaml:"recv,fromdefaults,optional"` }
func (*PullJob) GetAppendClientIdentity ¶ added in v0.7.4
func (*PullJob) GetRecvOptions ¶ added in v0.7.4
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.7.4
func (j *PushJob) GetFilesystems() FilesystemsFilter
func (*PushJob) GetSendOptions ¶ added in v0.7.4
func (j *PushJob) GetSendOptions() *SendOptions
type RecvOptions ¶ added in v0.7.4
type RecvOptions struct { Properties *PropertyRecvOptions `yaml:"properties,fromdefaults"` BandwidthLimit *BandwidthLimit `yaml:"bandwidth_limit,optional,fromdefaults"` Placeholder *PlaceholderRecvOptions `yaml:"placeholder,fromdefaults"` ExecPipe [][]string `yaml:"execpipe,optional"` }
type Replication ¶ added in v0.7.4
type Replication struct { Protection *ReplicationOptionsProtection `yaml:"protection,optional,fromdefaults"` Concurrency *ReplicationOptionsConcurrency `yaml:"concurrency,optional,fromdefaults"` OneStep bool `yaml:"one_step,optional"` }
type ReplicationOptionsConcurrency ¶ added in v0.7.4
type ReplicationOptionsProtection ¶ added in v0.7.4
type RetentionInterval ¶
type RetentionInterval struct {
// contains filtered or unexported fields
}
func ParseRetentionIntervalSpec ¶ added in v0.7.4
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.7.4
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:"embedded_data,optional,default=false"` Saved bool `yaml:"saved,optional,default=false"` BandwidthLimit *BandwidthLimit `yaml:"bandwidth_limit,optional,fromdefaults"` ExecPipe [][]string `yaml:"execpipe,optional"` }
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.7.4
func (*SinkJob) GetRecvOptions ¶ added in v0.7.4
func (j *SinkJob) GetRecvOptions() *RecvOptions
type SnapJob ¶
type SnapJob struct { Type string `yaml:"type"` Name string `yaml:"name"` Pruning PruningLocal `yaml:"pruning,optional"` Snapshotting SnapshottingEnum `yaml:"snapshotting"` Filesystems FilesystemsFilter `yaml:"filesystems"` MonitorSnapshots MonitorSnapshots `yaml:"monitor,optional"` }
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 SnapshottingPeriodic struct { Type string `yaml:"type"` Prefix string `yaml:"prefix"` Interval Duration `yaml:"interval,optional"` Cron string `yaml:"cron,optional"` Hooks HookList `yaml:"hooks,optional"` TimestampFormat string `yaml:"timestamp_format,optional,default=dense"` TimestampLocal bool `yaml:"timestamp_local,optional"` }
func (*SnapshottingPeriodic) CronSpec ¶ added in v0.7.4
func (self *SnapshottingPeriodic) CronSpec() string
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.7.4
func (j *SourceJob) GetFilesystems() FilesystemsFilter
func (*SourceJob) GetSendOptions ¶ added in v0.7.4
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"` 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.