MCPcopy Index your code
hub / github.com/coder/envbox / Send

Method Send

buildlog/coder.go:78–92  ·  view source on GitHub ↗
(level codersdk.LogLevel, log string)

Source from the content-addressed store, hash-verified

76}
77
78func (c *agentClientV2) Send(level codersdk.LogLevel, log string) error {
79 err := c.sl.Send(c.ctx, agentsdk.Log{
80 CreatedAt: time.Now(),
81 Output: log,
82 Level: level,
83 })
84 if err != nil {
85 return xerrors.Errorf("send build log: %w", err)
86 }
87 err = c.flush()
88 if err != nil {
89 return xerrors.Errorf("flush: %w", err)
90 }
91 return nil
92}
93
94func (c *agentClientV2) flush() error {
95 c.ls.Flush(c.source)

Callers

nothing calls this directly

Calls 3

flushMethod · 0.95
SendMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected