diff --git a/db.go b/db.go index 8914f794aa..8c7b6f16e5 100644 --- a/db.go +++ b/db.go @@ -2098,8 +2098,21 @@ const ( // or lifecycle management. An example of an external file is a file restored // from a backup. BackingTypeExternal + backingTypeCount ) +var backingTypeToString = [backingTypeCount]string{ + BackingTypeLocal: "local", + BackingTypeShared: "shared", + BackingTypeSharedForeign: "shared-foreign", + BackingTypeExternal: "external", +} + +// String implements fmt.Stringer. +func (b BackingType) String() string { + return backingTypeToString[b] +} + // SSTableInfo export manifest.TableInfo with sstable.Properties alongside // other file backing info. type SSTableInfo struct {