frostfs-s3-gw/api/data/listsession.go
Nikita Zinkevich 6970f52d2d
Some checks failed
/ DCO (pull_request) Successful in 1m18s
/ Vulncheck (pull_request) Successful in 1m32s
/ Builds (pull_request) Successful in 1m25s
/ Lint (pull_request) Failing after 1m5s
/ Tests (pull_request) Successful in 1m29s
[#469] List multipart uploads streaming
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-11-01 09:44:03 +03:00

33 lines
582 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(marker, uploadID string) (*MultipartInfo, error)
}
type ListMultipartSession struct {
CommonSession
Next *MultipartInfo
Stream MultipartInfoStream
}