base

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2017 License: Apache-2.0 Imports: 9 Imported by: 4

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 BackupConfig added in v0.6.0

type BackupConfig struct {
	Host     string
	Port     string
	User     string
	Password string

	// Xtrabackup
	XtrabackupBinPath string
	LsnTempDir        string
	ToLsn             string
	InsecureAuth      bool
	Parallel          int
	UseMemory         string
	DefaultsFile      string
}

func MakeBackupConfig added in v0.6.0

func MakeBackupConfig() *BackupConfig

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
	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.

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

Jump to

Keyboard shortcuts

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