Documentation ¶
Index ¶
- Constants
- type AnsibleCluster
- func (c *AnsibleCluster) Accessor() *sql.DB
- func (c *AnsibleCluster) Boostrap() error
- func (c *AnsibleCluster) Close() error
- func (c *AnsibleCluster) Deploy() error
- func (c *AnsibleCluster) Destory() error
- func (c *AnsibleCluster) Open() error
- func (c *AnsibleCluster) Prepare() error
- func (c *AnsibleCluster) Reset() error
- func (c *AnsibleCluster) Start() error
- func (c *AnsibleCluster) Stop() error
- type AnsibleConfig
- type BinPackage
- type Cluster
- type ClusterDSN
- type ClusterManager
Constants ¶
View Source
const (
GitHashNote = "Git Commit Hash"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnsibleCluster ¶
type AnsibleCluster struct {
// contains filtered or unexported fields
}
func NewAnsibleCluster ¶
func NewAnsibleCluster(ctx context.Context, meta *clusterMeta) *AnsibleCluster
func (*AnsibleCluster) Accessor ¶
func (c *AnsibleCluster) Accessor() *sql.DB
func (*AnsibleCluster) Boostrap ¶
func (c *AnsibleCluster) Boostrap() error
func (*AnsibleCluster) Close ¶
func (c *AnsibleCluster) Close() error
func (*AnsibleCluster) Deploy ¶
func (c *AnsibleCluster) Deploy() error
func (*AnsibleCluster) Destory ¶
func (c *AnsibleCluster) Destory() error
func (*AnsibleCluster) Open ¶
func (c *AnsibleCluster) Open() error
func (*AnsibleCluster) Prepare ¶
func (c *AnsibleCluster) Prepare() error
func (*AnsibleCluster) Reset ¶
func (c *AnsibleCluster) Reset() error
func (*AnsibleCluster) Start ¶
func (c *AnsibleCluster) Start() error
func (*AnsibleCluster) Stop ¶
func (c *AnsibleCluster) Stop() error
type AnsibleConfig ¶
type AnsibleConfig struct { Dir string `toml:"dir"` Clusters []*ClusterDSN `toml:"clusters"` }
type BinPackage ¶
type BinPackage struct { Repo string `json:"repo"` Branch string `json:"branch"` Tag string `json:"tag"` GitHash string `json:"git_hash"` Platform string `json:"platform"` BinUrl string `json:"binary_url"` }
func (*BinPackage) Valid ¶
func (p *BinPackage) Valid() bool
type Cluster ¶
type Cluster interface { Prepare() error // Prepare resources. Deploy() error // Deploy resources. Start() error // Start cluster. Stop() error // Stop cluster. Close() error // Close cluster. Reset() error // Cleanup cluster data. Destory() error // Cleanup Cluster data and resources. Accessor() *sql.DB }
type ClusterDSN ¶
type ClusterManager ¶
type ClusterManager struct {
// contains filtered or unexported fields
}
func NewClusterManager ¶
func NewClusterManager(ctx context.Context, cfg *AnsibleConfig) (*ClusterManager, error)
func (*ClusterManager) ReleaseCluster ¶
func (cm *ClusterManager) ReleaseCluster(name string)
func (*ClusterManager) RequireCluster ¶
func (cm *ClusterManager) RequireCluster(pd, tikv, tidb *BinPackage) (Cluster, error)
Click to show internal directories.
Click to hide internal directories.