aboutsummaryrefslogtreecommitdiffstats
path: root/listener/global.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--listener/global.go20
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
47var wg sync.WaitGroup // 掌管协程
48var rawChan chan interface{} // 从接收到整理的管道
49var cookedChan chan Event // 整理好的信息的管道
50var syscallTable [500]string //记录一下系统调用
51var containerdPid int
52
53// 插入到数据库的结构 47// 插入到数据库的结构
54type Exec struct { 48type 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
82const (
83 dbName string = "test"
84 pidColName string = "pids"
85 fdColName string = "fds"
86 fileColName string = "files"
87)
88
89var wg sync.WaitGroup // 掌管协程
90var rawChan chan interface{} // 从接收到整理的管道
91var cookedChan chan Event // 整理好的信息的管道
92var syscallTable [500]string //记录一下系统调用
93var containerdPid int // 容器守护进程进程号
94var pidCol, fdCol, fileCol mongoClient // 数据库集合