Documentation ¶
Index ¶
- Constants
- func FlattenBackupMeta(backup *meta.BackupMeta) map[string]*PartInfo
- func FlattenRestoreMeta(resp *meta.RestoreMetaResp) map[string][]*nebula.HostAddr
- func GenDataPathKey(host *nebula.HostAddr, partKey string) string
- func GenPartKey(spaceId, partId string) string
- func NewPathSelectorMap(storages []*meta.ServiceInfo) map[string]*PathSelector
- func ParseAddr(addrStr string) (*nebula.HostAddr, error)
- func ParseMetaFromFile(filename string) (*meta.BackupMeta, error)
- func StringifyAddr(addr *nebula.HostAddr) string
- func UriJoin(elem ...string) (string, error)
- type Config
- type HostDir
- type NebulaHosts
- type PartInfo
- type PathSelector
Constants ¶
View Source
const LocalTmpDir = "/tmp/nebula-br"
Variables ¶
This section is empty.
Functions ¶
func FlattenBackupMeta ¶
func FlattenBackupMeta(backup *meta.BackupMeta) map[string]*PartInfo
FlattenBackupMeta flatten backup meta to a map for convenience because of (spaceId + partId) can specify a unique part
func FlattenRestoreMeta ¶
func FlattenRestoreMeta(resp *meta.RestoreMetaResp) map[string][]*nebula.HostAddr
FlattenRestoreMeta flatten meta.RestoreMetaResp to a map for convenience because of (spaceId + partId) can specify a unique part
func GenDataPathKey ¶
GenDataPathKey generate a unique key for data path
func GenPartKey ¶
GenPartKey generate a unique key for part
func NewPathSelectorMap ¶
func NewPathSelectorMap(storages []*meta.ServiceInfo) map[string]*PathSelector
func ParseMetaFromFile ¶
func ParseMetaFromFile(filename string) (*meta.BackupMeta, error)
func StringifyAddr ¶
Types ¶
type NebulaHosts ¶
type NebulaHosts struct {
// contains filtered or unexported fields
}
func (*NebulaHosts) GetMetas ¶
func (h *NebulaHosts) GetMetas() []*meta.ServiceInfo
func (*NebulaHosts) GetStorages ¶
func (h *NebulaHosts) GetStorages() []*meta.ServiceInfo
func (*NebulaHosts) LoadFrom ¶
func (h *NebulaHosts) LoadFrom(resp *meta.ListClusterInfoResp) error
type PartInfo ¶
type PartInfo struct { SpaceID string PartID string HostAddr *nebula.HostAddr DataPath string CheckpointPath string CommitLogId int64 LastLogId int64 }
PartInfo save a unique part's information for FlattenBackupMeta
type PathSelector ¶
type PathSelector struct {
// contains filtered or unexported fields
}
func NewPathSelector ¶
func NewPathSelector(paths [][]byte) *PathSelector
func (*PathSelector) EvenlyGet ¶
func (p *PathSelector) EvenlyGet() string
Click to show internal directories.
Click to hide internal directories.