frostfs-node/pkg/local_object_storage/pilorama/info.go
Evgenii Stratonikov 5e843a73f9 [#1333] services/control: Return pilorama info in ListShards RPC
Do not return backend type from the service for now, because memory
backend is expected to vanish.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-07-21 15:08:24 +03:00

24 lines
537 B
Go

package pilorama
// Info groups the information about the pilorama.
type Info struct {
// Path contains path to the root-directory of the pilorama.
Path string
// Backend is the pilorama storage type. Either "boltdb" or "memory".
Backend string
}
// DumpInfo implements the ForestStorage interface.
func (t *boltForest) DumpInfo() Info {
return Info{
Path: t.path,
Backend: "boltdb",
}
}
// DumpInfo implements the ForestStorage interface.
func (f *memoryForest) DumpInfo() Info {
return Info{
Backend: "memory",
}
}