MCPcopy Create free account
hub / github.com/astercloud/aster / LogEventAsync

Method LogEventAsync

pkg/security/audit.go:456–463  ·  view source on GitHub ↗

LogEventAsync 异步记录事件

(event AuditEvent)

Source from the content-addressed store, hash-verified

454
455// LogEventAsync 异步记录事件
456func (al *InMemoryAuditLog) LogEventAsync(event AuditEvent) error {
457 select {
458 case al.eventChan <- event:
459 return nil
460 case <-time.After(time.Second):
461 return errors.New("audit log buffer full, event dropped")
462 }
463}
464
465// LogEvents 批量记录事件
466func (al *InMemoryAuditLog) LogEvents(events []AuditEvent) error {

Callers 2

LogEventsMethod · 0.95

Calls

no outgoing calls

Tested by 1