MCPcopy Create free account
hub / github.com/bytebase/bytebase / Send

Method Send

backend/api/v1/audit.go:147–167  ·  view source on GitHub ↗
(resp any)

Source from the content-addressed store, hash-verified

145}
146
147func (c *auditConnectStreamingConn) Send(resp any) error {
148 err := c.StreamingHandlerConn.Send(resp)
149 if err != nil {
150 return err
151 }
152 // Create audit log for each message pair
153 if c.curRequest != nil {
154 entry := &auditEntry{
155 request: c.curRequest,
156 response: resp,
157 method: c.method,
158 headers: c.RequestHeader(),
159 peerAddr: c.Peer().Addr,
160 latency: time.Since(c.startTime),
161 }
162 if auditErr := c.interceptor.createAuditLog(c.ctx, entry); auditErr != nil {
163 return auditErr
164 }
165 }
166 return nil
167}
168
169// auditEntry bundles the per-request data needed to write an audit log.
170// Bundling here keeps AuditInterceptor.createAuditLog to a short signature

Callers

nothing calls this directly

Calls 2

createAuditLogMethod · 0.80
SendMethod · 0.65

Tested by

no test coverage detected