frostfs-node/pkg/local_object_storage/blobovnicza/id.go
Evgenii Stratonikov 73f8bb3e5f [#1523] shard: Store generic storage ID in metabase
Allow to extend blobstor with more storage sub-systems. Currently
objects stored in the FSTree have empty byte slice descriptor and object
from blobovnicza tree have the same id as earlier. Each such change in
the identifier formation should be accompanied with metabase version
increase.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-22 13:14:19 +03:00

17 lines
285 B
Go

package blobovnicza
// ID represents Blobovnicza identifier.
type ID []byte
// NewIDFromBytes constructs an ID from a byte slice.
func NewIDFromBytes(v []byte) *ID {
return (*ID)(&v)
}
func (id ID) String() string {
return string(id)
}
func (id ID) Bytes() []byte {
return id
}