Documentation ¶
Index ¶
- type Config
- 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) Pid() int
- func (inst *PDInstance) Start(ctx context.Context, version v0manifest.Version) error
- func (inst *PDInstance) Wait() error
- type TiDBInstance
- type TiFlashInstance
- type TiKVInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance interface { Pid() int // Start the instance process. Start(ctx context.Context, version v0manifest.Version) error 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) Start ¶
func (inst *PDInstance) Start(ctx context.Context, version v0manifest.Version) error
Start calls set inst.cmd and Start
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) *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
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) 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) 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) Start ¶
func (inst *TiKVInstance) Start(ctx context.Context, version v0manifest.Version) error
Start calls set inst.cmd and Start
func (*TiKVInstance) StoreAddr ¶
func (inst *TiKVInstance) StoreAddr() string
StoreAddr return the store address of TiKV