diff options
Diffstat (limited to '')
-rw-r--r-- | listener/global.go | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/listener/global.go b/listener/global.go index b782284..49d6e94 100644 --- a/listener/global.go +++ b/listener/global.go | |||
@@ -44,12 +44,6 @@ type Event struct { | |||
44 | destPath string | 44 | destPath string |
45 | } | 45 | } |
46 | 46 | ||
47 | var wg sync.WaitGroup // 掌管协程 | ||
48 | var rawChan chan interface{} // 从接收到整理的管道 | ||
49 | var cookedChan chan Event // 整理好的信息的管道 | ||
50 | var syscallTable [500]string //记录一下系统调用 | ||
51 | var containerdPid int | ||
52 | |||
53 | // 插入到数据库的结构 | 47 | // 插入到数据库的结构 |
54 | type Exec struct { | 48 | type Exec struct { |
55 | Timestamp time.Time `bson:"timestamp"` | 49 | Timestamp time.Time `bson:"timestamp"` |
@@ -84,3 +78,17 @@ type File struct { | |||
84 | Written []time.Time `bson:"written"` | 78 | Written []time.Time `bson:"written"` |
85 | CloseTimestamp time.Time `bson:"close_timestamp"` | 79 | CloseTimestamp time.Time `bson:"close_timestamp"` |
86 | } | 80 | } |
81 | |||
82 | const ( | ||
83 | dbName string = "test" | ||
84 | pidColName string = "pids" | ||
85 | fdColName string = "fds" | ||
86 | fileColName string = "files" | ||
87 | ) | ||
88 | |||
89 | var wg sync.WaitGroup // 掌管协程 | ||
90 | var rawChan chan interface{} // 从接收到整理的管道 | ||
91 | var cookedChan chan Event // 整理好的信息的管道 | ||
92 | var syscallTable [500]string //记录一下系统调用 | ||
93 | var containerdPid int // 容器守护进程进程号 | ||
94 | var pidCol, fdCol, fileCol mongoClient // 数据库集合 | ||