forked from TrueCloudLab/frostfs-s3-gw
33 lines
570 B
Go
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
|
|
}
|