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 JobDebugSettings
- type JobEnum
- type LocalConnect
- type LocalServe
- type LoggingOutletCommon
- type LoggingOutletEnum
- type LoggingOutletEnumList
- type MonitoringEnum
- type PassiveJob
- type PositiveDurationOrManual
- type PrometheusMonitoring
- type PruneGrid
- type PruneKeepLastN
- type PruneKeepNotReplicated
- type PruneKeepRegex
- type PruningEnum
- type PruningLocal
- type PruningSenderReceiver
- type PullJob
- type PushJob
- type RetentionGrid
- type RetentionInterval
- type RetentionIntervalList
- type SSHStdinserverConnect
- 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"` }
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 JobDebugSettings ¶
type LocalConnect ¶
type LocalConnect struct { ConnectCommon `yaml:",inline"` ListenerName string `yaml:"listener_name"` ClientIdentity string `yaml:"client_identity"` }
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 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"` }
type PushJob ¶
type PushJob struct { ActiveJob `yaml:",inline"` Snapshotting SnapshottingEnum `yaml:"snapshotting"` Filesystems FilesystemsFilter `yaml:"filesystems"` }
type RetentionGrid ¶
type RetentionGrid struct {
// contains filtered or unexported fields
}
type RetentionInterval ¶
type RetentionInterval struct {
// contains filtered or unexported fields
}
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 ServeCommon ¶
type ServeCommon struct {
Type string `yaml:"type"`
}
type SinkJob ¶
type SinkJob struct { PassiveJob `yaml:",inline"` RootFS string `yaml:"root_fs"` }
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"` }
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"` DialTimeout time.Duration `yaml:"dial_timeout,zeropositive,default=10s"` }
type TCPLoggingOutlet ¶
type TCPLoggingOutlet struct { LoggingOutletCommon `yaml:",inline"` Address string `yaml:"address"` 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"` Clients map[string]string `yaml:"clients"` }
type TLSConnect ¶
Click to show internal directories.
Click to hide internal directories.