forked from scipipe/scipipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaudit.go
34 lines (31 loc) · 833 Bytes
/
audit.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package scipipe
import (
"time"
)
// AuditInfo contains structured audit/provenance logging information for a
// particular task (invocation), to go with all outgoing IPs from that task
type AuditInfo struct {
ID string
ProcessName string
Command string
Params map[string]string
Tags map[string]string
StartTime time.Time
FinishTime time.Time
ExecTimeNS time.Duration
OutFiles map[string]string
Upstream map[string]*AuditInfo
}
// NewAuditInfo returns a new AuditInfo struct
func NewAuditInfo() *AuditInfo {
return &AuditInfo{
ID: randSeqLC(20),
ProcessName: "",
Command: "",
Params: make(map[string]string),
Tags: make(map[string]string),
ExecTimeNS: -1,
OutFiles: make(map[string]string),
Upstream: make(map[string]*AuditInfo),
}
}