mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
fix: simplify passing auditLog eventType (#15278)
Rename Trigger -> Event to be a more appropriate name for the audit event. Bonus: fixes a bug in AddMRFWorker() it did not cancel the waitgroup, leading to waitgroup leaks.
This commit is contained in:
@@ -1036,7 +1036,7 @@ func totalNodeCount() uint64 {
|
||||
|
||||
// AuditLogOptions takes options for audit logging subsystem activity
|
||||
type AuditLogOptions struct {
|
||||
Trigger string
|
||||
Event string
|
||||
APIName string
|
||||
Status string
|
||||
VersionID string
|
||||
@@ -1046,7 +1046,8 @@ type AuditLogOptions struct {
|
||||
// sends audit logs for internal subsystem activity
|
||||
func auditLogInternal(ctx context.Context, bucket, object string, opts AuditLogOptions) {
|
||||
entry := audit.NewEntry(globalDeploymentID)
|
||||
entry.Trigger = opts.Trigger
|
||||
entry.Trigger = opts.Event
|
||||
entry.Event = opts.Event
|
||||
entry.Error = opts.Error
|
||||
entry.API.Name = opts.APIName
|
||||
entry.API.Bucket = bucket
|
||||
|
||||
Reference in New Issue
Block a user