frostfs-s3-gw/api/data/listsession.go
Nikita Zinkevich 0f5a2e0a15
[#469] List multipart uploads streaming
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-11-22 18:19:16 +03:00

33 lines
570 B
Go

package data
import (
"context"
"sync/atomic"
)
type VersionsStream interface {
Next(ctx context.Context) (*NodeVersion, error)
}
type CommonSession struct {
Context context.Context
Cancel context.CancelFunc
Acquired atomic.Bool
}
type ListSession struct {
CommonSession
Next []*ExtendedNodeVersion
Stream VersionsStream
NamesMap map[string]struct{}
}
type MultipartInfoStream interface {
Next(ctx context.Context) (*MultipartInfo, error)
}
type ListMultipartSession struct {
CommonSession
Next *MultipartInfo
Stream MultipartInfoStream
}