base

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// From IANA Service Name and Transport Protocol Port Number Registry
	// This port is unregistered for now.
	// https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?&page=126
	DefaultPort = "24925"
)

Variables

This section is empty.

Functions

func NewStoreDir

func NewStoreDir(v string) (string, error)

NewStoreDir returns an absolute path for value. This does not accept '~'.

Types

type BackupType

type BackupType int
const (
	FULL BackupType = iota
	INC
	UNKNOWN
)

func ConvertToType

func ConvertToType(t string) BackupType

func (BackupType) String

func (t BackupType) String() string

type Config

type Config struct {
	Host string

	Port string

	Addr string

	AdvertiseAddr string
}

func (*Config) InitDefaults

func (cfg *Config) InitDefaults()

type RestoreXtrabackupConfig

type RestoreXtrabackupConfig struct {
	XtrabackupBinPath   string
	InnobackupexBinPath string
	UseInnobackupex     bool
	IsLast              bool
	IncDir              string
	Parallel            int
	UseMemory           string
	DefaultsFile        string
}

type ServerConfig

type ServerConfig struct {
	*Config

	// StoreDir
	StoreDir *StoreSpec

	JoinAddr string

	EtcdPeerPort string

	NodeID polypb.NodeID

	HostName string

	StatusSampleInterval time.Duration

	ServeRateLimit uint64
}

Config is a configuration for polymerase server.

func MakeServerConfig

func MakeServerConfig() *ServerConfig

MakeConfig creates a initial Config.

func (*ServerConfig) BackupsDir

func (cfg *ServerConfig) BackupsDir() string

BackupsDir returns a directory path for backup data.

func (*ServerConfig) EtcdDataDir

func (cfg *ServerConfig) EtcdDataDir() string

EtcdDataDir returns a directory path for etcd data dir.

func (*ServerConfig) LogsDir

func (cfg *ServerConfig) LogsDir() string

LogsDir returns a directory path for log.

func (*ServerConfig) TempDir

func (cfg *ServerConfig) TempDir() string

TempDir returns a directory path for temporary.

type StoreSpec

type StoreSpec struct {
	Path string
}

func (*StoreSpec) Set

func (ss *StoreSpec) Set(value string) error

func (*StoreSpec) String

func (ss *StoreSpec) String() string

func (*StoreSpec) Type

func (ss *StoreSpec) Type() string

type XtrabackupCheckpoints

type XtrabackupCheckpoints struct {
	BackupType        string `ini:"backup_type"`
	FromLSN           string `ini:"from_lsn"`
	ToLSN             string `ini:"to_lsn"`
	LastLSN           string `ini:"last_lsn"`
	Compact           int    `ini:"compact"`
	RecoverBinlogInfo int    `ini:"recover_binlog_info"`
}

XtrabackupCheckpoints is for reflection. xtrabackup_checkpoints is like this: ``` backup_type = incremental from_lsn = 100 to_lsn = 110 last_lsn = 120 compact = 0 recover_binlog_info = 0 ```

func LoadXtrabackupCP

func LoadXtrabackupCP(source interface{}) XtrabackupCheckpoints

type XtrabackupConfig

type XtrabackupConfig struct {
	XtrabackupBinPath   string
	InnobackupexBinPath string
	Host                string
	Port                string
	User                string
	Password            string
	LsnTempDir          string
	ToLsn               string
	UseInnobackupex     bool
	InsecureAuth        bool
	Parallel            int
	UseMemory           string
	DefaultsFile        string
}

func MakeXtrabackupConfig

func MakeXtrabackupConfig() *XtrabackupConfig

Jump to

Keyboard shortcuts

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