Remove client instance being sent back in eventInfo() (#2167)

This commit is contained in:
Harshavardhana
2017-06-05 07:44:22 -07:00
committed by GitHub
parent fed9ebe39d
commit be3370396a
3 changed files with 10 additions and 18 deletions
+10 -13
View File
@@ -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,
}
}
}
-4
View File
@@ -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,
-1
View File
@@ -46,7 +46,6 @@ type EventInfo struct {
Time string
Size int64
Path string
Client Client
Type EventType
Host string
Port string