Documentation ¶
Index ¶
- func CompVersion(comp string, version v0manifest.Version) string
- type Config
- type Drainer
- type Instance
- type PDInstance
- func (inst *PDInstance) Addr() string
- func (inst *PDInstance) InitCluster(pds []*PDInstance) *PDInstance
- func (inst *PDInstance) Join(pds []*PDInstance) *PDInstance
- func (inst *PDInstance) Name() string
- func (inst *PDInstance) Pid() int
- func (inst *PDInstance) Start(ctx context.Context, version v0manifest.Version) error
- func (inst *PDInstance) StatusAddrs() (addrs []string)
- func (inst *PDInstance) Wait() error
- type Pump
- type TiDBInstance
- type TiFlashInstance
- func (inst *TiFlashInstance) Addr() string
- func (inst *TiFlashInstance) Cmd() *exec.Cmd
- func (inst *TiFlashInstance) Pid() int
- func (inst *TiFlashInstance) Start(ctx context.Context, version v0manifest.Version) error
- func (inst *TiFlashInstance) StatusAddrs() (addrs []string)
- func (inst *TiFlashInstance) StoreAddr() string
- func (inst *TiFlashInstance) Wait() error
- type TiKVInstance
- func (inst *TiKVInstance) Addr() string
- func (inst *TiKVInstance) Pid() int
- func (inst *TiKVInstance) Start(ctx context.Context, version v0manifest.Version) error
- func (inst *TiKVInstance) StatusAddrs() (addrs []string)
- func (inst *TiKVInstance) StoreAddr() string
- func (inst *TiKVInstance) Wait() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompVersion ¶ added in v1.0.5
func CompVersion(comp string, version v0manifest.Version) string
CompVersion return the format to run specified version of a component.
Types ¶
type Drainer ¶ added in v1.0.5
type Drainer struct {
// contains filtered or unexported fields
}
Drainer represent a drainer instance.
func NewDrainer ¶ added in v1.0.5
func NewDrainer(binPath string, dir, host, configPath string, id int, pds []*PDInstance) *Drainer
NewDrainer create a Drainer instance.
func (*Drainer) StatusAddrs ¶ added in v1.0.5
func (inst *Drainer) StatusAddrs() (addrs []string)
type Instance ¶
type Instance interface { Pid() int // Start the instance process. Start(ctx context.Context, version v0manifest.Version) error StatusAddrs() []string Wait() error }
Instance represent running component
type PDInstance ¶
type PDInstance struct {
// contains filtered or unexported fields
}
PDInstance represent a running pd-server
func NewPDInstance ¶
func NewPDInstance(binPath, dir, host, configPath string, id int) *PDInstance
NewPDInstance return a PDInstance
func (*PDInstance) Addr ¶
func (inst *PDInstance) Addr() string
Addr return the listen address of PD
func (*PDInstance) InitCluster ¶ added in v1.0.3
func (inst *PDInstance) InitCluster(pds []*PDInstance) *PDInstance
InitCluster set the init cluster instance.
func (*PDInstance) Join ¶
func (inst *PDInstance) Join(pds []*PDInstance) *PDInstance
Join set endpoints field of PDInstance
func (*PDInstance) Name ¶ added in v1.0.5
func (inst *PDInstance) Name() string
Name return the name of pd.
func (*PDInstance) Start ¶
func (inst *PDInstance) Start(ctx context.Context, version v0manifest.Version) error
Start calls set inst.cmd and Start
func (*PDInstance) StatusAddrs ¶ added in v1.0.4
func (inst *PDInstance) StatusAddrs() (addrs []string)
type Pump ¶ added in v1.0.5
type Pump struct {
// contains filtered or unexported fields
}
Pump represent a pump instance.
func NewPump ¶ added in v1.0.5
func NewPump(binPath string, dir, host, configPath string, id int, pds []*PDInstance) *Pump
NewPump create a Pump instance.
func (*Pump) StatusAddrs ¶ added in v1.0.5
func (inst *Pump) StatusAddrs() (addrs []string)
type TiDBInstance ¶
type TiDBInstance struct {
// contains filtered or unexported fields
}
TiDBInstance represent a running tidb-server
func NewTiDBInstance ¶
func NewTiDBInstance(binPath string, dir, host, configPath string, id int, pds []*PDInstance, enableBinlog bool) *TiDBInstance
NewTiDBInstance return a TiDBInstance
func (*TiDBInstance) Addr ¶
func (inst *TiDBInstance) Addr() string
Addr return the listen address of TiDB
func (*TiDBInstance) Start ¶
func (inst *TiDBInstance) Start(ctx context.Context, version v0manifest.Version) error
Start calls set inst.cmd and Start
func (*TiDBInstance) StatusAddrs ¶ added in v1.0.4
func (inst *TiDBInstance) StatusAddrs() (addrs []string)
type TiFlashInstance ¶
type TiFlashInstance struct { TCPPort int ServicePort int ProxyPort int ProxyStatusPort int ProxyConfigPath string // contains filtered or unexported fields }
TiFlashInstance represent a running TiFlash
func NewTiFlashInstance ¶
func NewTiFlashInstance(binPath, dir, host, configPath string, id int, pds []*PDInstance, dbs []*TiDBInstance) *TiFlashInstance
NewTiFlashInstance return a TiFlashInstance
func (*TiFlashInstance) Addr ¶ added in v1.0.5
func (inst *TiFlashInstance) Addr() string
Addr return the address of tiflash
func (*TiFlashInstance) Cmd ¶ added in v1.0.4
func (inst *TiFlashInstance) Cmd() *exec.Cmd
Cmd returns the internal Cmd instance
func (*TiFlashInstance) Pid ¶
func (inst *TiFlashInstance) Pid() int
Pid return the PID of the instance
func (*TiFlashInstance) Start ¶
func (inst *TiFlashInstance) Start(ctx context.Context, version v0manifest.Version) error
Start calls set inst.cmd and Start
func (*TiFlashInstance) StatusAddrs ¶ added in v1.0.4
func (inst *TiFlashInstance) StatusAddrs() (addrs []string)
StatusAddrs implements Instance interface.
func (*TiFlashInstance) StoreAddr ¶
func (inst *TiFlashInstance) StoreAddr() string
StoreAddr return the store address of TiFlash
type TiKVInstance ¶
type TiKVInstance struct {
// contains filtered or unexported fields
}
TiKVInstance represent a running tikv-server
func NewTiKVInstance ¶
func NewTiKVInstance(binPath string, dir, host, configPath string, id int, pds []*PDInstance) *TiKVInstance
NewTiKVInstance return a TiKVInstance
func (*TiKVInstance) Addr ¶ added in v1.0.5
func (inst *TiKVInstance) Addr() string
Addr return the address of tikv.
func (*TiKVInstance) Start ¶
func (inst *TiKVInstance) Start(ctx context.Context, version v0manifest.Version) error
Start calls set inst.cmd and Start
func (*TiKVInstance) StatusAddrs ¶ added in v1.0.4
func (inst *TiKVInstance) StatusAddrs() (addrs []string)
func (*TiKVInstance) StoreAddr ¶
func (inst *TiKVInstance) StoreAddr() string
StoreAddr return the store address of TiKV