pkg

package
v0.0.0-...-f5de34e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDBName = "postgres"
)

Variables

This section is empty.

Functions

func DefaultRootDir

func DefaultRootDir() string

Types

type CommonOutResp

type CommonOutResp struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

type Extension

type Extension string
const (
	ExtnJSON Extension = "JSON"
)

type IAgentServer

type IAgentServer interface {
	CheckStatus(in *model.HealthCheckIn) error
	Backup(in *model.BackupIn) (string, error)
	DeleteBackup(in *model.DeleteBackupIn) error
	Restore(in *model.RestoreIn) error
	ShowDetail(in *model.ShowDetailIn) (*model.BackupInfo, error)
	ShowList(in *model.ShowListIn) ([]model.BackupInfo, error)
	ShowDiskSpace(in *model.DiskSpaceIn) (*model.DiskSpaceInfo, error)
}

func NewAgentServer

func NewAgentServer(addr string) IAgentServer

type ILocalStorage

type ILocalStorage interface {
	WriteByJSON(name string, contents *model.LsBackup) error
	GenFilename(extn Extension) string
	ReadAll() ([]*model.LsBackup, error)
	ReadByID(id string) (*model.LsBackup, error)
	ReadByCSN(csn string) (*model.LsBackup, error)
	ReadAllByCSN(csn string) ([]*model.LsBackup, error)
	DeleteByName(name string) error
	HideByName(name string) error
	DeleteByHidedName(name string) error
}

func NewLocalStorage

func NewLocalStorage(root string) (ILocalStorage, error)

type IShardingSphereProxy

type IShardingSphereProxy interface {
	ExportMetaData() (*model.ClusterInfo, error)
	ExportStorageNodes() ([]*model.StorageNode, error)
	LockForRestore() error
	LockForBackup() error
	Unlock() error
	ImportMetaData(in *model.ClusterInfo) error
	DropDatabase(shardingDBName string) error
}

func NewShardingSphereProxy

func NewShardingSphereProxy(user, password, dbName, host string, port uint16) (IShardingSphereProxy, error)

Directories

Path Synopsis
Package mock_pkg is a generated GoMock package.
Package mock_pkg is a generated GoMock package.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL