Documentation ¶
Index ¶
- type ChunkWriter
- type ClientConstructor
- type HeadPrm
- type HeaderWriter
- type ObjectWriter
- type Option
- func WithClientConstructor(v ClientConstructor) Option
- func WithKeyStorage(store *util.KeyStorage) Option
- func WithLocalStorageEngine(e *engine.StorageEngine) Option
- func WithLogger(l *logger.Logger) Option
- func WithNetMapSource(nmSrc netmap.Source) Option
- func WithTraverserGenerator(t *util.TraverserGenerator) Option
- func WithoutAssembly() Option
- type Prm
- type RangeHashPrm
- func (p *RangeHashPrm) SetCommonParameters(common *util.CommonPrm)
- func (p *RangeHashPrm) SetHashGenerator(v func() hash.Hash)
- func (p *RangeHashPrm) SetRangeList(rngs []*objectSDK.Range)
- func (p *RangeHashPrm) SetRequestForwarder(f RequestForwarder)
- func (p *RangeHashPrm) SetSalt(salt []byte)
- func (p *RangeHashPrm) WithAddress(addr *objectSDK.Address)
- func (p *RangeHashPrm) WithRawFlag(raw bool)
- type RangeHashRes
- type RangePrm
- func (p *RangePrm) SetChunkWriter(w ChunkWriter)
- func (p *RangePrm) SetCommonParameters(common *util.CommonPrm)
- func (p *RangePrm) SetRange(rng *objectSDK.Range)
- func (p *RangePrm) SetRequestForwarder(f RequestForwarder)
- func (p *RangePrm) WithAddress(addr *objectSDK.Address)
- func (p *RangePrm) WithRawFlag(raw bool)
- type RequestForwarder
- type Service
- type SimpleObjectWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkWriter ¶ added in v0.13.0
ChunkWriter is an interface of target component to write payload chunk.
type ClientConstructor ¶ added in v0.18.0
type ClientConstructor interface {
Get(client.NodeInfo) (client.MultiAddressClient, error)
}
type HeadPrm ¶ added in v0.13.0
type HeadPrm struct {
// contains filtered or unexported fields
}
HeadPrm groups parameters of Head service call.
func (*HeadPrm) SetCommonParameters ¶ added in v0.13.0
SetCommonParameters sets common parameters of the operation.
func (*HeadPrm) SetHeaderWriter ¶ added in v0.13.0
func (p *HeadPrm) SetHeaderWriter(w HeaderWriter)
SetHeaderWriter sets target component to write the object header.
func (*HeadPrm) SetRequestForwarder ¶ added in v0.19.0
func (p *HeadPrm) SetRequestForwarder(f RequestForwarder)
func (*HeadPrm) WithAddress ¶ added in v0.27.0
WithAddress sets object address to be read.
func (*HeadPrm) WithRawFlag ¶ added in v0.27.0
func (p *HeadPrm) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type HeaderWriter ¶ added in v0.13.0
HeaderWriter is an interface of target component to write object header.
type ObjectWriter ¶ added in v0.13.0
type ObjectWriter interface { HeaderWriter ChunkWriter }
ObjectWriter is an interface of target component to write object.
type Option ¶
type Option func(*cfg)
Option is a Service's constructor option.
func WithClientConstructor ¶ added in v0.18.0
func WithClientConstructor(v ClientConstructor) Option
WithClientConstructor returns option to set constructor of remote node clients.
func WithKeyStorage ¶ added in v0.26.1
func WithKeyStorage(store *util.KeyStorage) Option
WithKeyStorage returns option to set private key storage for session tokens and node key.
func WithLocalStorageEngine ¶ added in v0.13.0
func WithLocalStorageEngine(e *engine.StorageEngine) Option
WithLocalStorageEngine returns option to set local storage instance.
func WithLogger ¶ added in v0.13.0
WithLogger returns option to specify Get service's logger.
func WithNetMapSource ¶ added in v0.14.1
WithNetMapSource returns option to set network map storage to receive current network state.
func WithTraverserGenerator ¶ added in v0.13.0
func WithTraverserGenerator(t *util.TraverserGenerator) Option
WithTraverserGenerator returns option to set generator of placement traverser to get the objects from containers.
func WithoutAssembly ¶ added in v0.13.0
func WithoutAssembly() Option
WithoutAssembly returns option to disable object assembling.
type Prm ¶
type Prm struct {
// contains filtered or unexported fields
}
Prm groups parameters of Get service call.
func (*Prm) SetCommonParameters ¶ added in v0.13.0
SetCommonParameters sets common parameters of the operation.
func (*Prm) SetObjectWriter ¶ added in v0.13.0
func (p *Prm) SetObjectWriter(w ObjectWriter)
SetObjectWriter sets target component to write the object.
func (*Prm) SetRequestForwarder ¶ added in v0.19.0
func (p *Prm) SetRequestForwarder(f RequestForwarder)
func (*Prm) WithAddress ¶
WithAddress sets object address to be read.
func (*Prm) WithRawFlag ¶ added in v0.27.0
func (p *Prm) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type RangeHashPrm ¶ added in v0.13.0
type RangeHashPrm struct {
// contains filtered or unexported fields
}
RangeHashPrm groups parameters of GetRange service call.
func (*RangeHashPrm) SetCommonParameters ¶ added in v0.13.0
SetCommonParameters sets common parameters of the operation.
func (*RangeHashPrm) SetHashGenerator ¶ added in v0.13.0
func (p *RangeHashPrm) SetHashGenerator(v func() hash.Hash)
SetHashGenerator sets constructor of hashing algorithm.
func (*RangeHashPrm) SetRangeList ¶ added in v0.13.0
func (p *RangeHashPrm) SetRangeList(rngs []*objectSDK.Range)
SetRangeList sets list of object payload ranges.
func (*RangeHashPrm) SetRequestForwarder ¶ added in v0.19.0
func (p *RangeHashPrm) SetRequestForwarder(f RequestForwarder)
func (*RangeHashPrm) SetSalt ¶ added in v0.14.1
func (p *RangeHashPrm) SetSalt(salt []byte)
SetSalt sets binary salt to XOR object's payload ranges before hash calculation.
func (*RangeHashPrm) WithAddress ¶ added in v0.27.0
WithAddress sets object address to be read.
func (*RangeHashPrm) WithRawFlag ¶ added in v0.27.0
func (p *RangeHashPrm) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type RangeHashRes ¶ added in v0.13.0
type RangeHashRes struct {
// contains filtered or unexported fields
}
func (*RangeHashRes) Hashes ¶ added in v0.13.0
func (r *RangeHashRes) Hashes() [][]byte
type RangePrm ¶ added in v0.13.0
type RangePrm struct {
// contains filtered or unexported fields
}
RangePrm groups parameters of GetRange service call.
func (*RangePrm) SetChunkWriter ¶ added in v0.13.0
func (p *RangePrm) SetChunkWriter(w ChunkWriter)
SetChunkWriter sets target component to write the object payload range.
func (*RangePrm) SetCommonParameters ¶ added in v0.13.0
SetCommonParameters sets common parameters of the operation.
func (*RangePrm) SetRequestForwarder ¶ added in v0.19.0
func (p *RangePrm) SetRequestForwarder(f RequestForwarder)
func (*RangePrm) WithAddress ¶ added in v0.27.0
WithAddress sets object address to be read.
func (*RangePrm) WithRawFlag ¶ added in v0.27.0
func (p *RangePrm) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type RequestForwarder ¶ added in v0.19.0
type RequestForwarder func(coreclient.NodeInfo, coreclient.MultiAddressClient) (*objectSDK.Object, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service utility serving requests of Object.Get service.
func New ¶ added in v0.13.0
New creates, initializes and returns utility serving Object.Get service requests.
func (*Service) Get ¶
Get serves a request to get an object by address, and returns Streamer instance.
func (*Service) GetRange ¶ added in v0.13.0
GetRange serves a request to get an object by address, and returns Streamer instance.
func (*Service) GetRangeHash ¶ added in v0.13.0
func (s *Service) GetRangeHash(ctx context.Context, prm RangeHashPrm) (*RangeHashRes, error)
type SimpleObjectWriter ¶ added in v0.13.0
type SimpleObjectWriter struct {
// contains filtered or unexported fields
}
func NewSimpleObjectWriter ¶ added in v0.13.0
func NewSimpleObjectWriter() *SimpleObjectWriter
func (*SimpleObjectWriter) Object ¶ added in v0.13.0
func (s *SimpleObjectWriter) Object() *object.Object
func (*SimpleObjectWriter) WriteChunk ¶ added in v0.13.0
func (s *SimpleObjectWriter) WriteChunk(p []byte) error
func (*SimpleObjectWriter) WriteHeader ¶ added in v0.13.0
func (s *SimpleObjectWriter) WriteHeader(obj *object.Object) error