MCPcopy
hub / github.com/baetyl/baetyl / reportAsync

Method reportAsync

sync/sync.go:211–223  ·  view source on GitHub ↗
(r v1.Report)

Source from the content-addressed store, hash-verified

209}
210
211func (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
225func (s *sync) Report(r v1.Report) (v1.Desire, error) {
226 msg := &v1.Message{

Callers 1

reportAndDesireMethod · 0.95

Calls 2

SendMethod · 0.65
DebugMethod · 0.65

Tested by

no test coverage detected