(r v1.Report)
| 209 | } |
| 210 | |
| 211 | func (s *sync) reportAsync(r v1.Report) error { |
| 212 | msg := &v1.Message{ |
| 213 | Kind: v1.MessageReport, |
| 214 | Metadata: map[string]string{"source": os.Getenv(context.KeySvcName)}, |
| 215 | Content: v1.LazyValue{Value: r}, |
| 216 | } |
| 217 | err := s.link.Send(msg) |
| 218 | if err != nil { |
| 219 | return errors.Trace(err) |
| 220 | } |
| 221 | s.log.Debug("reports cloud shadow async", log.Any("report", msg)) |
| 222 | return nil |
| 223 | } |
| 224 | |
| 225 | func (s *sync) Report(r v1.Report) (v1.Desire, error) { |
| 226 | msg := &v1.Message{ |
no test coverage detected