[#1320] English Check

Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
Elizaveta Chichindaeva 2022-04-21 14:28:05 +03:00 committed by LeL
parent d99800ee93
commit cc7a723d77
182 changed files with 802 additions and 802 deletions

View file

@ -19,7 +19,7 @@ import (
"go.uber.org/zap"
)
// represents storage of the "small" objects.
// represents the storage of the "small" objects.
//
// Each object is stored in Blobovnicza's (B-s).
// B-s are structured in a multilevel directory hierarchy
@ -44,7 +44,7 @@ import (
// Elements of the deepest level are B-s.
// B-s are allocated dynamically. At each moment of the time there is
// an active B (ex. A), set of already filled B-s (ex. F) and
// list of not yet initialized B-s (ex. X). After filling the active B
// a list of not yet initialized B-s (ex. X). After filling the active B
// it becomes full, and next B becomes initialized and active.
//
// Active B and some of the full B-s are cached (LRU). All cached

View file

@ -9,7 +9,7 @@ func (b *BlobStor) Open() error {
// Init initializes internal data structures and system resources.
//
// If BlobStor is already initialized, then no action is taken.
// If BlobStor is already initialized, no action is taken.
func (b *BlobStor) Init() error {
b.log.Debug("initializing...")

View file

@ -13,10 +13,10 @@ type DeleteBigPrm struct {
address
}
// DeleteBigRes groups resulting values of DeleteBig operation.
// DeleteBigRes groups the resulting values of DeleteBig operation.
type DeleteBigRes struct{}
// DeleteBig removes object from shallow dir of BLOB storage.
// DeleteBig removes an object from shallow dir of BLOB storage.
//
// Returns any error encountered that did not allow
// to completely remove the object.

View file

@ -6,10 +6,10 @@ type DeleteSmallPrm struct {
rwBlobovniczaID
}
// DeleteSmallRes groups resulting values of DeleteSmall operation.
// DeleteSmallRes groups the resulting values of DeleteSmall operation.
type DeleteSmallRes struct{}
// DeleteSmall removes object from blobovnicza of BLOB storage.
// DeleteSmall removes an object from blobovnicza of BLOB storage.
//
// If blobovnicza ID is not set or set to nil, BlobStor tries to
// find and remove object from any blobovnicza.

View file

@ -15,7 +15,7 @@ type ExistsPrm struct {
address
}
// ExistsRes groups resulting values of Exists operation.
// ExistsRes groups the resulting values of Exists operation.
type ExistsRes struct {
exists bool
}
@ -25,7 +25,7 @@ func (r ExistsRes) Exists() bool {
return r.exists
}
// Exists checks if object is presented in BLOB storage.
// Exists checks if the object is presented in BLOB storage.
//
// Returns any error encountered that did not allow
// to completely check object existence.

View file

@ -15,7 +15,7 @@ import (
oidSDK "github.com/nspcc-dev/neofs-sdk-go/object/id"
)
// FSTree represents object storage as filesystem tree.
// FSTree represents an object storage as a filesystem tree.
type FSTree struct {
Info
@ -160,7 +160,7 @@ func (t *FSTree) treePath(addr *addressSDK.Address) string {
return filepath.Join(dirs...)
}
// Delete removes object with the specified address from storage.
// Delete removes the object with the specified address from the storage.
func (t *FSTree) Delete(addr *addressSDK.Address) error {
p, err := t.Exists(addr)
if err != nil {
@ -170,7 +170,7 @@ func (t *FSTree) Delete(addr *addressSDK.Address) error {
return os.Remove(p)
}
// Exists returns path to file with object contents if it exists in storage
// Exists returns the path to the file with object contents if it exists in the storage
// and an error otherwise.
func (t *FSTree) Exists(addr *addressSDK.Address) (string, error) {
p := t.treePath(addr)
@ -183,7 +183,7 @@ func (t *FSTree) Exists(addr *addressSDK.Address) (string, error) {
return p, err
}
// Put puts object in storage.
// Put puts an object in the storage.
func (t *FSTree) Put(addr *addressSDK.Address, data []byte) error {
p := t.treePath(addr)
@ -211,7 +211,7 @@ func (t *FSTree) PutStream(addr *addressSDK.Address, handler func(*os.File) erro
return handler(f)
}
// Get returns object from storage by address.
// Get returns an object from the storage by address.
func (t *FSTree) Get(addr *addressSDK.Address) ([]byte, error) {
p := t.treePath(addr)

View file

@ -14,7 +14,7 @@ type GetBigPrm struct {
address
}
// GetBigRes groups resulting values of GetBig operation.
// GetBigRes groups the resulting values of GetBig operation.
type GetBigRes struct {
roObject
}
@ -24,7 +24,7 @@ type GetBigRes struct {
// Returns any error encountered that
// did not allow to completely read the object.
//
// Returns an error of type apistatus.ObjectNotFound if requested object is not
// Returns an error of type apistatus.ObjectNotFound if the requested object is not
// presented in shallow dir.
func (b *BlobStor) GetBig(prm *GetBigPrm) (*GetBigRes, error) {
// get compressed object data

View file

@ -16,7 +16,7 @@ type GetRangeBigPrm struct {
rwRange
}
// GetRangeBigRes groups resulting values of GetRangeBig operation.
// GetRangeBigRes groups the resulting values of GetRangeBig operation.
type GetRangeBigRes struct {
rangeData
}
@ -26,7 +26,7 @@ type GetRangeBigRes struct {
// Returns any error encountered that
// did not allow to completely read the object payload range.
//
// Returns ErrRangeOutOfBounds if requested object range is out of bounds.
// Returns ErrRangeOutOfBounds if the requested object range is out of bounds.
// Returns an error of type apistatus.ObjectNotFound if object is missing.
func (b *BlobStor) GetRangeBig(prm *GetRangeBigPrm) (*GetRangeBigRes, error) {
// get compressed object data

View file

@ -7,7 +7,7 @@ type GetRangeSmallPrm struct {
rwBlobovniczaID
}
// GetRangeSmallRes groups resulting values of GetRangeSmall operation.
// GetRangeSmallRes groups the resulting values of GetRangeSmall operation.
type GetRangeSmallRes struct {
rangeData
}
@ -20,8 +20,8 @@ type GetRangeSmallRes struct {
// Returns any error encountered that
// did not allow to completely read the object payload range.
//
// Returns ErrRangeOutOfBounds if requested object range is out of bounds.
// Returns an error of type apistatus.ObjectNotFound if requested object is missing in blobovnicza(s).
// Returns ErrRangeOutOfBounds if the requested object range is out of bounds.
// Returns an error of type apistatus.ObjectNotFound if the requested object is missing in blobovnicza(s).
func (b *BlobStor) GetRangeSmall(prm *GetRangeSmallPrm) (*GetRangeSmallRes, error) {
return b.blobovniczas.getRange(prm)
}

View file

@ -6,20 +6,20 @@ type GetSmallPrm struct {
rwBlobovniczaID
}
// GetSmallRes groups resulting values of GetSmall operation.
// GetSmallRes groups the resulting values of GetSmall operation.
type GetSmallRes struct {
roObject
}
// GetSmall reads the object from blobovnicza of BLOB storage by address.
//
// If blobovnicza ID is not set or set to nil, BlobStor tries to get object
// If blobovnicza ID is not set or set to nil, BlobStor tries to get the object
// from any blobovnicza.
//
// Returns any error encountered that
// did not allow to completely read the object.
//
// Returns an error of type apistatus.ObjectNotFound if requested object is missing in blobovnicza(s).
// Returns an error of type apistatus.ObjectNotFound if the requested object is missing in blobovnicza(s).
func (b *BlobStor) GetSmall(prm *GetSmallPrm) (*GetSmallRes, error) {
return b.blobovniczas.get(prm)
}

View file

@ -16,13 +16,13 @@ type IterationElement struct {
blzID *blobovnicza.ID
}
// ObjectData returns stored object in a binary representation.
// ObjectData returns the stored object in a binary representation.
func (x IterationElement) ObjectData() []byte {
return x.data
}
// BlobovniczaID returns identifier of Blobovnicza in which object is stored.
// Returns nil if object isn't in Blobovnicza.
// BlobovniczaID returns the identifier of Blobovnicza in which object is stored.
// Returns nil if the object isn't in Blobovnicza.
func (x IterationElement) BlobovniczaID() *blobovnicza.ID {
return x.blzID
}
@ -36,7 +36,7 @@ type IteratePrm struct {
ignoreErrors bool
}
// IterateRes groups resulting values of Iterate operation.
// IterateRes groups the resulting values of Iterate operation.
type IterateRes struct{}
// SetIterationHandler sets the action to be performed on each iteration.

View file

@ -17,7 +17,7 @@ type PutPrm struct {
rwObject
}
// PutRes groups resulting values of Put operation.
// PutRes groups the resulting values of Put operation.
type PutRes struct {
roBlobovniczaID
}
@ -40,8 +40,8 @@ func (b *BlobStor) Put(prm *PutPrm) (*PutRes, error) {
return b.PutRaw(object.AddressOf(prm.obj), data, b.NeedsCompression(prm.obj))
}
// NeedsCompression returns true if object should be compressed.
// For object to be compressed 2 conditions must hold:
// NeedsCompression returns true if the object should be compressed.
// For an object to be compressed 2 conditions must hold:
// 1. Compression is enabled in settings.
// 2. Object MIME Content-Type is allowed for compression.
func (b *BlobStor) NeedsCompression(obj *objectSDK.Object) bool {
@ -71,7 +71,7 @@ func (b *BlobStor) NeedsCompression(obj *objectSDK.Object) bool {
return b.compressionEnabled
}
// PutRaw saves already marshaled object in BLOB storage.
// PutRaw saves an already marshaled object in BLOB storage.
func (b *BlobStor) PutRaw(addr *addressSDK.Address, data []byte, compress bool) (*PutRes, error) {
big := b.isBig(data)