forked from TrueCloudLab/frostfs-node
Dmitrii Stepanov
d62c6e4ce6
Add tracing spans for PUT requests. Add tracing spans for DELETE requests. Add tracing spans for SELECT requests. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
29 lines
869 B
Go
29 lines
869 B
Go
package common
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/compression"
|
|
)
|
|
|
|
// Storage represents key-value object storage.
|
|
// It is used as a building block for a blobstor of a shard.
|
|
type Storage interface {
|
|
Open(readOnly bool) error
|
|
Init() error
|
|
Close() error
|
|
|
|
Type() string
|
|
Path() string
|
|
SetCompressor(cc *compression.Config)
|
|
// SetReportErrorFunc allows to provide a function to be called on disk errors.
|
|
// This function MUST be called before Open.
|
|
SetReportErrorFunc(f func(string, error))
|
|
|
|
Get(context.Context, GetPrm) (GetRes, error)
|
|
GetRange(context.Context, GetRangePrm) (GetRangeRes, error)
|
|
Exists(context.Context, ExistsPrm) (ExistsRes, error)
|
|
Put(context.Context, PutPrm) (PutRes, error)
|
|
Delete(context.Context, DeletePrm) (DeleteRes, error)
|
|
Iterate(IteratePrm) (IterateRes, error)
|
|
}
|