implement pull + sink modes for active and passive side

This commit is contained in:
Christian Schwarz
2018-09-24 12:31:29 +02:00
parent 6889f441b2
commit d04b9713c4
5 changed files with 120 additions and 4 deletions
+2
View File
@@ -102,10 +102,12 @@ func (s *Status) UnmarshalJSON(in []byte) (err error) {
return fmt.Errorf("field '%s', not found", key)
}
switch s.Type {
case TypePull: fallthrough
case TypePush:
var st ActiveSideStatus
err = json.Unmarshal(jobJSON, &st)
s.JobSpecific = &st
case TypeSource: fallthrough
case TypeSink:
var st PassiveStatus
err = json.Unmarshal(jobJSON, &st)