add object metadata to notification events

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-08-12 18:51:47 +02:00
parent 8ab4a9aa70
commit f03fdd1155
32 changed files with 276 additions and 105 deletions

View File

@@ -297,11 +297,12 @@ func (fs *HTTPFs) Lstat(name string) (os.FileInfo, error) {
}
// Open opens the named file for reading
func (fs *HTTPFs) Open(name string, offset int64) (File, *pipeat.PipeReaderAt, func(), error) {
func (fs *HTTPFs) Open(name string, offset int64) (File, *PipeReader, func(), error) {
r, w, err := pipeat.PipeInDir(fs.localTempDir)
if err != nil {
return nil, nil, nil, err
}
p := NewPipeReader(r)
ctx, cancelFn := context.WithCancel(context.Background())
var queryString string
@@ -326,7 +327,7 @@ func (fs *HTTPFs) Open(name string, offset int64) (File, *pipeat.PipeReaderAt, f
metric.HTTPFsTransferCompleted(n, 1, err)
}()
return nil, r, cancelFn, nil
return nil, p, cancelFn, nil
}
// Create creates or opens the named file for writing