Remove client instance being sent back in eventInfo() (#2167)
This commit is contained in:
+10
-13
@@ -162,25 +162,22 @@ func (f *fsClient) Watch(params watchParams) (*watchObject, *probe.Error) {
|
||||
continue
|
||||
}
|
||||
eventChan <- EventInfo{
|
||||
Time: UTCNow().Format(timeFormatFS),
|
||||
Size: i.Size(),
|
||||
Path: event.Path(),
|
||||
Client: f,
|
||||
Type: EventCreate,
|
||||
Time: UTCNow().Format(timeFormatFS),
|
||||
Size: i.Size(),
|
||||
Path: event.Path(),
|
||||
Type: EventCreate,
|
||||
}
|
||||
} else if IsDeleteEvent(event.Event()) {
|
||||
eventChan <- EventInfo{
|
||||
Time: UTCNow().Format(timeFormatFS),
|
||||
Path: event.Path(),
|
||||
Client: f,
|
||||
Type: EventRemove,
|
||||
Time: UTCNow().Format(timeFormatFS),
|
||||
Path: event.Path(),
|
||||
Type: EventRemove,
|
||||
}
|
||||
} else if IsGetEvent(event.Event()) {
|
||||
eventChan <- EventInfo{
|
||||
Time: UTCNow().Format(timeFormatFS),
|
||||
Path: event.Path(),
|
||||
Client: f,
|
||||
Type: EventAccessed,
|
||||
Time: UTCNow().Format(timeFormatFS),
|
||||
Path: event.Path(),
|
||||
Type: EventAccessed,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,6 @@ func (c *s3Client) Watch(params watchParams) (*watchObject, *probe.Error) {
|
||||
Time: record.EventTime,
|
||||
Size: record.S3.Object.Size,
|
||||
Path: u.String(),
|
||||
Client: c,
|
||||
Type: EventCreate,
|
||||
Host: record.Source.Host,
|
||||
Port: record.Source.Port,
|
||||
@@ -460,7 +459,6 @@ func (c *s3Client) Watch(params watchParams) (*watchObject, *probe.Error) {
|
||||
eventChan <- EventInfo{
|
||||
Time: record.EventTime,
|
||||
Path: u.String(),
|
||||
Client: c,
|
||||
Type: EventRemove,
|
||||
Host: record.Source.Host,
|
||||
Port: record.Source.Port,
|
||||
@@ -471,7 +469,6 @@ func (c *s3Client) Watch(params watchParams) (*watchObject, *probe.Error) {
|
||||
Time: record.EventTime,
|
||||
Size: record.S3.Object.Size,
|
||||
Path: u.String(),
|
||||
Client: c,
|
||||
Type: EventAccessedRead,
|
||||
Host: record.Source.Host,
|
||||
Port: record.Source.Port,
|
||||
@@ -482,7 +479,6 @@ func (c *s3Client) Watch(params watchParams) (*watchObject, *probe.Error) {
|
||||
Time: record.EventTime,
|
||||
Size: record.S3.Object.Size,
|
||||
Path: u.String(),
|
||||
Client: c,
|
||||
Type: EventAccessedStat,
|
||||
Host: record.Source.Host,
|
||||
Port: record.Source.Port,
|
||||
|
||||
@@ -46,7 +46,6 @@ type EventInfo struct {
|
||||
Time string
|
||||
Size int64
|
||||
Path string
|
||||
Client Client
|
||||
Type EventType
|
||||
Host string
|
||||
Port string
|
||||
|
||||
Reference in New Issue
Block a user