local job config

This commit is contained in:
Anton Schirg
2018-08-26 23:29:57 +02:00
parent 48a08e4f4d
commit 5e51595d7f
2 changed files with 56 additions and 0 deletions

View File

@@ -54,6 +54,14 @@ type SourceJob struct {
Pruning PruningLocal `yaml:"pruning"`
}
type LocalJob struct {
Type string `yaml:"type"`
Name string `yaml:"name"`
Replication LocalReplication `yaml:"replication"`
Snapshotting Snapshotting `yaml:"snapshotting"`
Pruning PruningSenderReceiver `yaml:"pruning"`
}
type PushReplication struct {
Connect ConnectEnum `yaml:"connect"`
Filesystems map[string]bool `yaml:"filesystems"`
@@ -69,6 +77,11 @@ type SourceReplication struct {
Filesystems map[string]bool `yaml:"filesystems"`
}
type LocalReplication struct {
Filesystems map[string]bool `yaml:"filesystems"`
RootDataset string `yaml:"root_dataset"`
}
type Snapshotting struct {
SnapshotPrefix string `yaml:"snapshot_prefix"`
Interval time.Duration `yaml:"interval"`
@@ -220,6 +233,7 @@ func (t *JobEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error) {
"sink": &SinkJob{},
"pull": &PullJob{},
"source": &SourceJob{},
"local": &LocalJob{},
})
return
}