Versions in this module Expand all Collapse all v0 v0.0.6 Aug 5, 2023 v0.0.5 Aug 5, 2023 v0.0.4 Aug 4, 2023 v0.0.3 Aug 4, 2023 v0.0.2 Aug 4, 2023 Changes in this version + const AnsibleImportedConfigPath + const BackupDirName + const ComponentAlertmanager + const ComponentBlackboxExporter + const ComponentCDC + const ComponentCheckCollector + const ComponentDMMaster + const ComponentDMWorker + const ComponentDrainer + const ComponentGrafana + const ComponentNginx + const ComponentNodeExporter + const ComponentPD + const ComponentPrometheus + const ComponentPump + const ComponentPushwaygate + const ComponentSpark + const ComponentTiDB + const ComponentTiFlash + const ComponentTiKV + const ComponentTiSpark + const PFXClientCert + const PatchDirName + const TLSCACert + const TLSCAKey + const TLSCertKeyDir + const TLSClientCert + const TLSClientKey + const TempConfigPath + const TiFlashStorageKeyLatestDirs + const TiFlashStorageKeyMainDirs + const TiFlashStorageKeyRaftDirs + const TiUPAuditDir + const TiUPClusterDir + const TiUPPackageCacheDir + var CopyConfigFile = checkpoint.Register(checkpoint.Field("config-file", reflect.DeepEqual)) + var ErrCreateDirFailed = errNS.NewType("create_dir_failed") + var ErrMultipleTiSparkMaster = errors.New(...) + var ErrMultipleTisparkWorker = errors.New("multiple TiSpark workers on the same host is not supported by Spark") + var ErrNoTiSparkMaster = errors.New("there must be a Spark master node if you want to use the TiSpark component") + var ErrSaveMetaFailed = errNS.NewType("save_meta_failed") + var ErrTopologyParseFailed = errNSTopolohy.NewType("parse_failed", utils.ErrTraitPreCheck) + var ErrTopologyReadFailed = errNSTopolohy.NewType("read_failed", utils.ErrTraitPreCheck) + var ErrUserOrGroupInvalid = errors.New(...) + var ErrorCheckConfig = errors.New("check config failed") + var RoleMonitor = "monitor" + var RoleTiSparkMaster = "tispark-master" + var RoleTiSparkWorker = "tispark-worker" + var TopoTypeDM = "dm-cluster" + var TopoTypeTiDB = "tidb-cluster" + func Abs(user, path string) string + func AlertManagerEndpoints(alertmanager []*AlertmanagerSpec, user string, enableTLS bool) []*scripts.AlertManagerScript + func AllComponentNames() (roles []string) + func AuditDir() string + func CheckClusterDirConflict(clusterList map[string]Metadata, clusterName string, topo Topology) error + func CheckClusterDirOverlap(entries []DirEntry) error + func CheckClusterPortConflict(clusterList map[string]Metadata, clusterName string, topo Topology) error + func CheckTiKVLabels(pdLocLabels []string, slp TiKVLabelProvider) error + func ClusterPath(cluster string, subpath ...string) string + func ComponentSubDir(comp, version string) string + func ExpandRelativeDir(topo Topology) + func FillHostArch(s interface{}, hostArch map[string]string) error + func FlattenMap(ms map[string]interface{}) map[string]interface + func FoldMap(ms map[string]interface{}) map[string]interface + func GetValueFromPath(m map[string]interface{}, p string) interface + func HandleImportPathMigration(clsName string) error + func Initialize(base string) error + func IterHost(topo Topology, fn func(instance Instance)) + func LoadClientCert(dir string) (*tls.Config, error) + func Merge2Toml(comp string, global, overwrite map[string]interface{}) ([]byte, error) + func MergeConfig(orig map[string]interface{}, overwrites ...map[string]interface{}) map[string]interface + func MergeResourceControl(lhs, rhs meta.ResourceControl) meta.ResourceControl + func MultiDirAbs(user, paths string) []string + func PackagePath(comp string, version string, os string, arch string) string + func ParseTopologyYaml(file string, out Topology) error + func PortStarted(ctx context.Context, e ctxt.Executor, port int, timeout uint64) error + func PortStopped(ctx context.Context, e ctxt.Executor, port int, timeout uint64) error + func ProfileDir() string + func ProfilePath(subpath ...string) string + func ReadYamlFile(file string) ([]byte, error) + func RelativePathDetect(topo interface{}, isSkipField func(reflect.Value) bool) error + func SaveClusterMeta(clusterName string, cmeta *ClusterMeta) error + func TiDBComponentVersion(comp, version string) string + func UptimeByHost(host string, port int, tlsCfg *tls.Config) time.Duration + type AlertManagerComponent struct + func (c *AlertManagerComponent) Instances() []Instance + func (c *AlertManagerComponent) Name() string + func (c *AlertManagerComponent) Role() string + type AlertManagerInstance struct + func (i *AlertManagerInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *AlertManagerInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, clusterName string, ...) error + type AlertmanagerSpec struct + Arch string + ClusterPort int + ConfigFilePath string + DataDir string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + LogDir string + NumaNode string + OS string + Patched bool + ResourceControl meta.ResourceControl + SSHPort int + WebPort int + func (s *AlertmanagerSpec) GetMainPort() int + func (s *AlertmanagerSpec) IgnoreMonitorAgent() bool + func (s *AlertmanagerSpec) IsImported() bool + func (s *AlertmanagerSpec) Role() string + func (s *AlertmanagerSpec) SSH() (string, int) + type AuroraConfig struct + Name string + type AwsAuroraConfigs struct + CIDR string + DBParameterFamilyGroup string + DBPassword string + DBUserName string + Engine string + EngineVersion string + InstanceType string + PubliclyAccessibleFlag bool + S3BackupFolder string + type AwsCloudFormationConfigs struct + Parameters map[string]string + TemplateBodyFilePath string + TemplateURL string + type AwsDMSConfigs struct + CIDR string + InstanceType string + type AwsESTopoConfigs struct + ESServer AwsNodeModal + General AwsTopoConfigsGeneral + type AwsKafkaTopoConfigs struct + Broker AwsNodeModal + Connector AwsNodeModal + General AwsTopoConfigsGeneral + RestService AwsNodeModal + SchemaRegistry AwsNodeModal + Zookeeper AwsNodeModal + type AwsMSConfigs struct + CIDR string + DBMasterUser string + DBMasterUserPass string + DBParameterFamilyGroup string + DiskSize int + Engine string + EngineVerion string + ImageId string + InstanceType string + KeyName string + type AwsMSKConnectPluginTopoConfigs struct + Name string + S3Bucket string + S3Folder string + URL string + type AwsMSKTopoConfigs struct + CIDR string + ExcludedAZ []string + IncludedAZ []string + InstanceType string + SubnetsNum int + type AwsMongoTopoConfigs struct + ConfigServer AwsNodeModal + General AwsTopoConfigsGeneral + Mongos AwsNodeModal + ReplicaSet []AwsNodeModal + type AwsMySQLTopoConfigs struct + General AwsTopoConfigsGeneral + Worker AwsNodeModal + type AwsNodeModal struct + Count int + DesiredCapacity int32 + InstanceType string + Iops int + Labels []struct{ ... } + MaxSize int32 + MinSize int32 + VolumeSize int + VolumeType string + type AwsNodeVolume struct + Iops int + Size int + Throughput int + VolumeType string + type AwsOracleConfigs struct + CIDR string + DBInstanceName string + DBPassword string + DBUserName string + InstanceType string + VolumeSize int + type AwsPostgresConfigs struct + CIDR string + DBParameterFamilyGroup string + DBPassword string + DBSize string + DBUserName string + Engine string + EngineVersion string + InstanceType string + PubliclyAccessibleFlag bool + type AwsRedshiftTopoConfigs struct + AdminUser string + CIDR string + ClusterType string + InstanceType string + Password string + type AwsTopoConfigs struct + AlertManager AwsNodeModal + DMMaster AwsNodeModal + DMWorker AwsNodeModal + Drainer AwsNodeModal + General AwsTopoConfigsGeneral + Grafana AwsNodeModal + Monitor AwsNodeModal + PD AwsNodeModal + Pump AwsNodeModal + TiCDC AwsNodeModal + TiDB AwsNodeModal + TiFlash AwsNodeModal + TiKV []AwsNodeModal + type AwsTopoConfigsGeneral struct + CIDR string + EnableThanos string + ExcludedAZ []string + ImageId string + IncludedAZ []string + InstanceType string + KeyFile string + KeyName string + Name string + NetworkType string + Region string + SubnetsNum int + TiDBVersion string + type AwsWSConfigs struct + CIDR string + EnableMonitoring string + ImageId string + InstanceType string + KeyFile string + KeyName string + UserName string + VolumeSize int + type BaseInstance struct + Dirs []string + Host string + ListenHost string + Name string + Port int + Ports []int + SSHP int + StatusFn func(tlsCfg *tls.Config, pdHosts ...string) string + UptimeFn func(tlsCfg *tls.Config) time.Duration + func (i *BaseInstance) Arch() string + func (i *BaseInstance) ComponentName() string + func (i *BaseInstance) DataDir() string + func (i *BaseInstance) DeployDir() string + func (i *BaseInstance) GetHost() string + func (i *BaseInstance) GetListenHost() string + func (i *BaseInstance) GetPort() int + func (i *BaseInstance) GetSSHPort() int + func (i *BaseInstance) ID() string + func (i *BaseInstance) InitConfig(ctx context.Context, e ctxt.Executor, opt GlobalOptions, user string, ...) (err error) + func (i *BaseInstance) InstanceName() string + func (i *BaseInstance) IsPatched() bool + func (i *BaseInstance) IteratorLocalConfigDir(ctx context.Context, local string, filter func(string) bool, ...) error + func (i *BaseInstance) LogDir() string + func (i *BaseInstance) MergeServerConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *BaseInstance) OS() string + func (i *BaseInstance) PrepareStart(ctx context.Context, tlsCfg *tls.Config) error + func (i *BaseInstance) Ready(ctx context.Context, e ctxt.Executor, timeout uint64) error + func (i *BaseInstance) ServiceName() string + func (i *BaseInstance) SetPatched(p bool) + func (i *BaseInstance) Status(tlsCfg *tls.Config, pdList ...string) string + func (i *BaseInstance) TransferLocalConfigDir(ctx context.Context, e ctxt.Executor, local, remote string, ...) error + func (i *BaseInstance) TransferLocalConfigFile(ctx context.Context, e ctxt.Executor, local, remote string) error + func (i *BaseInstance) Uptime(tlsCfg *tls.Config) time.Duration + func (i *BaseInstance) UsedDirs() []string + func (i *BaseInstance) UsedPorts() []int + type BaseMeta struct + Group string + OpsVer *string + User string + Version string + type BaseTopo struct + Alertmanagers []*AlertmanagerSpec + AwsAuroraConfigs *AwsAuroraConfigs + AwsCloudFormationConfigs *AwsCloudFormationConfigs + AwsDMSConfigs *AwsDMSConfigs + AwsESTopoConfigs *AwsESTopoConfigs + AwsKafkaTopoConfigs *AwsKafkaTopoConfigs + AwsMSConfigs *AwsMSConfigs + AwsMSKConnectPluginTopoConfigs *AwsMSKConnectPluginTopoConfigs + AwsMSKTopoConfigs *AwsMSKTopoConfigs + AwsMongoTopoConfigs *AwsMongoTopoConfigs + AwsMySQLConfigs *AwsMySQLTopoConfigs + AwsOracleConfigs *AwsOracleConfigs + AwsPostgresConfigs *AwsPostgresConfigs + AwsRedshiftTopoConfigs *AwsRedshiftTopoConfigs + AwsTopoConfigs *AwsTopoConfigs + AwsWSConfigs *AwsWSConfigs + DrainerReplicate *DrainerReplicate + GlobalOptions *GlobalOptions + Grafanas []*GrafanaSpec + MasterList []string + MonitoredOptions *MonitoredOptions + Monitors []*PrometheusSpec + TiDBCloud *TiDBCloud + TiDBCloudConfigs *TiDBCloudConfigs + type BindVersion func(comp string, version string) (bindVersion string) + type CDCComponent struct + Topology *Specification + func (c *CDCComponent) Instances() []Instance + func (c *CDCComponent) Name() string + func (c *CDCComponent) Role() string + type CDCInstance struct + func (i *CDCInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *CDCInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type CDCSpec struct + Arch string + Config map[string]interface{} + DataDir string + DeployDir string + GCTTL int64 + Host string + IgnoreExporter bool + Imported bool + LogDir string + NumaNode string + OS string + Offline bool + Patched bool + Port int + ResourceControl meta.ResourceControl + SSHPort int + TZ string + func (s *CDCSpec) GetMainPort() int + func (s *CDCSpec) IgnoreMonitorAgent() bool + func (s *CDCSpec) IsImported() bool + func (s *CDCSpec) Role() string + func (s *CDCSpec) SSH() (string, int) + type ClusterMeta struct + OpsVer string + Topology *Specification + User string + Version string + func ClusterMetadata(clusterName string) (*ClusterMeta, error) + func (m *ClusterMeta) GetBaseMeta() *BaseMeta + func (m *ClusterMeta) GetTopology() Topology + func (m *ClusterMeta) SetTopology(topo Topology) + func (m *ClusterMeta) SetUser(s string) + func (m *ClusterMeta) SetVersion(s string) + type Component interface + Instances func() []Instance + Name func() string + Role func() string + func FindComponent(topo Topology, name string) Component + type DirAccessor struct + type DirEntry struct + type DrainerComponent struct + Topology *Specification + func (c *DrainerComponent) Instances() []Instance + func (c *DrainerComponent) Name() string + func (c *DrainerComponent) Role() string + type DrainerInstance struct + func (i *DrainerInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *DrainerInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type DrainerReplicate struct + ReplicateDB string + type DrainerSpec struct + Arch string + CommitTS int64 + Config map[string]interface{} + DataDir string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + LogDir string + NumaNode string + OS string + Offline bool + Patched bool + Port int + ResourceControl meta.ResourceControl + SSHPort int + func (s *DrainerSpec) GetMainPort() int + func (s *DrainerSpec) IgnoreMonitorAgent() bool + func (s *DrainerSpec) IsImported() bool + func (s *DrainerSpec) Role() string + func (s *DrainerSpec) SSH() (string, int) + type ExternalAlertmanager struct + Host string + WebPort int + type GlobalOptions struct + Arch string + Custom interface{} + DataDir string + DeployDir string + Group string + Host string + LogDir string + OS string + ResourceControl meta.ResourceControl + SSHKey string + SSHPort int + SSHType executor.SSHType + TLSEnabled bool + User string + type GrafanaComponent struct + func (c *GrafanaComponent) Instances() []Instance + func (c *GrafanaComponent) Name() string + func (c *GrafanaComponent) Role() string + type GrafanaInstance struct + func (i *GrafanaInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *GrafanaInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, clusterName string, ...) error + type GrafanaSpec struct + AnonymousEnable bool + Arch string + DashboardDir string + DeployDir string + Domain string + Host string + IgnoreExporter bool + Imported bool + OS string + Password string + Patched bool + Port int + ResourceControl meta.ResourceControl + RootURL string + SSHPort int + Username string + func (s *GrafanaSpec) GetMainPort() int + func (s *GrafanaSpec) IgnoreMonitorAgent() bool + func (s *GrafanaSpec) IsImported() bool + func (s *GrafanaSpec) Role() string + func (s *GrafanaSpec) SSH() (string, int) + type Instance interface + Arch func() string + ComponentName func() string + DataDir func() string + DeployDir func() string + GetHost func() string + GetPort func() int + GetSSHPort func() int + ID func() string + InitConfig func(ctx context.Context, e ctxt.Executor, clusterName string, ...) error + InstanceName func() string + IsPatched func() bool + LogDir func() string + OS func() string + PrepareStart func(ctx context.Context, tlsCfg *tls.Config) error + Ready func(context.Context, ctxt.Executor, uint64) error + ScaleConfig func(ctx context.Context, e ctxt.Executor, topo Topology, clusterName string, ...) error + ServiceName func() string + SetPatched func(bool) + Status func(tlsCfg *tls.Config, pdList ...string) string + Uptime func(tlsCfg *tls.Config) time.Duration + UsedDirs func() []string + UsedPorts func() []int + type InstanceSpec interface + GetMainPort func() int + IgnoreMonitorAgent func() bool + IsImported func() bool + Role func() string + SSH func() (string, int) + type Metadata interface + GetBaseMeta func() *BaseMeta + GetTopology func() Topology + SetTopology func(topo Topology) + type MonitorComponent struct + func (c *MonitorComponent) Instances() []Instance + func (c *MonitorComponent) Name() string + func (c *MonitorComponent) Role() string + type MonitorInstance struct + func (i *MonitorInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *MonitorInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, clusterName string, ...) error + type MonitoredOptions struct + BlackboxExporterPort int + DataDir string + DeployDir string + LogDir string + NodeExporterPort int + NumaNode string + ResourceControl meta.ResourceControl + type NginxComponent struct + Topology *Specification + func (c *NginxComponent) Instances() []Instance + func (c *NginxComponent) Name() string + func (c *NginxComponent) Role() string + type NginxInstance struct + Name string + func (i *NginxInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *NginxInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type NginxSpec struct + Arch string + ClientPort int + Config map[string]interface{} + DataDir string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + ListenHost string + LogDir string + Name string + OS string + Patched bool + ResourceControl meta.ResourceControl + SSHPort int + func (s *NginxSpec) GetMainPort() int + func (s *NginxSpec) IgnoreMonitorAgent() bool + func (s *NginxSpec) IsImported() bool + func (s *NginxSpec) Role() string + func (s *NginxSpec) SSH() (string, int) + func (s *NginxSpec) Status(tlsCfg *tls.Config, _ ...string) string + type PDComponent struct + Topology *Specification + func (c *PDComponent) Instances() []Instance + func (c *PDComponent) Name() string + func (c *PDComponent) Role() string + type PDInstance struct + Name string + func (i *PDInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *PDInstance) IsLeader(topo Topology, apiTimeoutSeconds int, tlsCfg *tls.Config) (bool, error) + func (i *PDInstance) PostRestart(topo Topology, tlsCfg *tls.Config) error + func (i *PDInstance) PreRestart(topo Topology, apiTimeoutSeconds int, tlsCfg *tls.Config) error + func (i *PDInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type PDSpec struct + AdvertiseClientAddr string + AdvertisePeerAddr string + Arch string + ClientPort int + Config map[string]interface{} + DataDir string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + ListenHost string + LogDir string + Name string + NumaNode string + OS string + Patched bool + PeerPort int + ResourceControl meta.ResourceControl + SSHPort int + func (s *PDSpec) GetMainPort() int + func (s *PDSpec) IgnoreMonitorAgent() bool + func (s *PDSpec) IsImported() bool + func (s *PDSpec) Role() string + func (s *PDSpec) SSH() (string, int) + func (s *PDSpec) Status(tlsCfg *tls.Config, _ ...string) string + type PrometheusSpec struct + Arch string + DataDir string + DeployDir string + ExternalAlertmanagers []ExternalAlertmanager + Host string + IgnoreExporter bool + Imported bool + LogDir string + NumaNode string + OS string + Patched bool + Port int + RemoteConfig Remote + ResourceControl meta.ResourceControl + Retention string + RuleDir string + SSHPort int + func (s *PrometheusSpec) GetMainPort() int + func (s *PrometheusSpec) IgnoreMonitorAgent() bool + func (s *PrometheusSpec) IsImported() bool + func (s *PrometheusSpec) Role() string + func (s *PrometheusSpec) SSH() (string, int) + type PumpComponent struct + Topology *Specification + func (c *PumpComponent) Instances() []Instance + func (c *PumpComponent) Name() string + func (c *PumpComponent) Role() string + type PumpInstance struct + func (i *PumpInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *PumpInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type PumpSpec struct + Arch string + Config map[string]interface{} + DataDir string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + LogDir string + NumaNode string + OS string + Offline bool + Patched bool + Port int + ResourceControl meta.ResourceControl + SSHPort int + func (s *PumpSpec) GetMainPort() int + func (s *PumpSpec) IgnoreMonitorAgent() bool + func (s *PumpSpec) IsImported() bool + func (s *PumpSpec) Role() string + func (s *PumpSpec) SSH() (string, int) + type Remote struct + RemoteRead []map[string]interface{} + RemoteWrite []map[string]interface{} + type RollingUpdateInstance interface + PostRestart func(topo Topology, tlsCfg *tls.Config) error + PreRestart func(topo Topology, apiTimeoutSeconds int, tlsCfg *tls.Config) error + type ScaleOutTopology interface + MergeTopo func(topo Topology) Topology + NewPart func() Topology + type ServerConfigs struct + CDC map[string]interface{} + Drainer map[string]interface{} + Nginx map[string]interface{} + PD map[string]interface{} + Pump map[string]interface{} + TiDB map[string]interface{} + TiFlash map[string]interface{} + TiFlashLearner map[string]interface{} + TiKV map[string]interface{} + type SpecManager struct + func GetSpecManager() *SpecManager + func NewSpec(base string, newMeta func() Metadata) *SpecManager + func (s *SpecManager) Exist(name string) (exist bool, err error) + func (s *SpecManager) GetAllClusters() (map[string]Metadata, error) + func (s *SpecManager) List() (names []string, err error) + func (s *SpecManager) Metadata(clusterName string, meta interface{}) error + func (s *SpecManager) NewMetadata() Metadata + func (s *SpecManager) Path(cluster string, subpath ...string) string + func (s *SpecManager) Remove(name string) error + func (s *SpecManager) SaveMeta(clusterName string, meta Metadata) error + type Specification struct + Alertmanagers []*AlertmanagerSpec + AwsAuroraConfigs AwsAuroraConfigs + AwsCloudFormationConfigs AwsCloudFormationConfigs + AwsDMSConfigs AwsDMSConfigs + AwsESTopoConfigs AwsESTopoConfigs + AwsKafkaTopoConfigs AwsKafkaTopoConfigs + AwsMSConfigs AwsMSConfigs + AwsMSKConnectPluginTopoConfigs AwsMSKConnectPluginTopoConfigs + AwsMSKTopoConfigs AwsMSKTopoConfigs + AwsMongoTopoConfigs AwsMongoTopoConfigs + AwsMySQLConfigs AwsMySQLTopoConfigs + AwsOracleConfigs AwsOracleConfigs + AwsPostgresConfigs AwsPostgresConfigs + AwsRedshiftTopoConfigs AwsRedshiftTopoConfigs + AwsTopoConfigs AwsTopoConfigs + AwsWSConfigs AwsWSConfigs + CDCServers []*CDCSpec + DrainerReplicate DrainerReplicate + Drainers []*DrainerSpec + GlobalOptions GlobalOptions + Grafanas []*GrafanaSpec + MonitoredOptions MonitoredOptions + Monitors []*PrometheusSpec + NginxServers []*NginxSpec + PDServers []*PDSpec + PumpServers []*PumpSpec + ServerConfigs ServerConfigs + TiDBCloud TiDBCloud + TiDBCloudConfigs TiDBCloudConfigs + TiDBServers []*TiDBSpec + TiFlashServers []*TiFlashSpec + TiKVServers []*TiKVSpec + TiSparkMasters []*TiSparkMasterSpec + TiSparkWorkers []*TiSparkWorkerSpec + func (s *Specification) AdjustByVersion(clusterVersion string) + func (s *Specification) BaseTopo() *BaseTopo + func (s *Specification) ComponentsByStartOrder() (comps []Component) + func (s *Specification) ComponentsByStopOrder() (comps []Component) + func (s *Specification) ComponentsByUpdateOrder() (comps []Component) + func (s *Specification) CountDir(targetHost, dirPrefix string) int + func (s *Specification) Endpoints(user string) []*scripts.PDScript + func (s *Specification) FillHostArch(hostArch map[string]string) error + func (s *Specification) GetDashboardAddress(tlsCfg *tls.Config, pdList ...string) (string, error) + func (s *Specification) GetEtcdClient(tlsCfg *tls.Config) (*clientv3.Client, error) + func (s *Specification) GetEtcdProxyClient(tlsCfg *tls.Config, tcpProxy *proxy.TCPProxy) (*clientv3.Client, chan struct{}, error) + func (s *Specification) GetMonitoredOptions() *MonitoredOptions + func (s *Specification) GetPDList() []string + func (s *Specification) GetTiKVLabels() (map[string]map[string]string, error) + func (s *Specification) IterComponent(fn func(comp Component)) + func (s *Specification) IterInstance(fn func(instance Instance)) + func (s *Specification) LocationLabels() ([]string, error) + func (s *Specification) Merge(that Topology) Topology + func (s *Specification) MergeTopo(topo Topology) Topology + func (s *Specification) NewPart() Topology + func (s *Specification) TLSConfig(dir string) (*tls.Config, error) + func (s *Specification) Type() string + func (s *Specification) UnmarshalYAML(unmarshal func(interface{}) error) error + func (s *Specification) Validate() error + type TiDBCloud struct + General TiDBCloudGeneral + TiDB TiDBCloudNode + TiFlash TiDBCloudNode + TiKV TiDBCloudNode + type TiDBCloudComponent struct + TiDB TiDBCloudComponentSpec + TiFlash TiDBCloudComponentSpec + TiKV TiDBCloudComponentSpec + type TiDBCloudComponentSpec struct + NodeQuantity int32 + NodeSize string + StorageSizeGib int32 + type TiDBCloudConfigs struct + CloudProvider string + ClusterType string + Components TiDBCloudComponent + Databases []string + Host string + IPAccessList TiDBCloudIPAccessList + Password string + Port int32 + Region string + TiDBCloudProjectID string + User string + type TiDBCloudGeneral struct + Password string + Port int32 + ProjectID int64 + Region string + type TiDBCloudIPAccessList struct + CIDR string + Description string + type TiDBCloudNode struct + Count int + NodeSize string + Storage int + type TiDBComponent struct + Topology *Specification + func (c *TiDBComponent) Instances() []Instance + func (c *TiDBComponent) Name() string + func (c *TiDBComponent) Role() string + type TiDBInstance struct + func (i *TiDBInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *TiDBInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type TiDBSpec struct + AdvertiseAddr string + Arch string + Config map[string]interface{} + DeployDir string + Host string + IgnoreExporter bool + Imported bool + ListenHost string + LogDir string + NumaNode string + OS string + Patched bool + Port int + ResourceControl meta.ResourceControl + SSHPort int + StatusPort int + func (s *TiDBSpec) GetMainPort() int + func (s *TiDBSpec) IgnoreMonitorAgent() bool + func (s *TiDBSpec) IsImported() bool + func (s *TiDBSpec) Role() string + func (s *TiDBSpec) SSH() (string, int) + type TiFlashComponent struct + Topology *Specification + func (c *TiFlashComponent) Instances() []Instance + func (c *TiFlashComponent) Name() string + func (c *TiFlashComponent) Role() string + type TiFlashInstance struct + func (i *TiFlashInstance) CheckIncorrectConfigs() error + func (i *TiFlashInstance) GetServicePort() int + func (i *TiFlashInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *TiFlashInstance) InitTiFlashLearnerConfig(cfg *scripts.TiFlashScript, clusterVersion string, src map[string]interface{}) (map[string]interface{}, error) + func (i *TiFlashInstance) PrepareStart(ctx context.Context, tlsCfg *tls.Config) error + func (i *TiFlashInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type TiFlashSpec struct + Arch string + Config map[string]interface{} + DataDir string + DeployDir string + FlashProxyPort int + FlashProxyStatusPort int + FlashServicePort int + HTTPPort int + Host string + IgnoreExporter bool + Imported bool + LearnerConfig map[string]interface{} + LogDir string + NumaNode string + OS string + Offline bool + Patched bool + ResourceControl meta.ResourceControl + SSHPort int + StatusPort int + TCPPort int + TmpDir string + func (s *TiFlashSpec) GetMainPort() int + func (s *TiFlashSpec) GetOverrideDataDir() (string, error) + func (s *TiFlashSpec) IgnoreMonitorAgent() bool + func (s *TiFlashSpec) IsImported() bool + func (s *TiFlashSpec) Role() string + func (s *TiFlashSpec) SSH() (string, int) + func (s *TiFlashSpec) Status(tlsCfg *tls.Config, pdList ...string) string + type TiKVComponent struct + Topology *Specification + func (c *TiKVComponent) Instances() []Instance + func (c *TiKVComponent) Name() string + func (c *TiKVComponent) Role() string + type TiKVInstance struct + func (i *TiKVInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) error + func (i *TiKVInstance) PostRestart(topo Topology, tlsCfg *tls.Config) error + func (i *TiKVInstance) PreRestart(topo Topology, apiTimeoutSeconds int, tlsCfg *tls.Config) error + func (i *TiKVInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type TiKVLabelError struct + TiKVInstances map[string][]error + func (e *TiKVLabelError) Error() string + type TiKVLabelProvider interface + GetTiKVLabels func() (map[string]map[string]string, error) + type TiKVSpec struct + AdvertiseAddr string + AdvertiseStatusAddr string + Arch string + Config map[string]interface{} + DataDir string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + ListenHost string + LogDir string + NumaNode string + OS string + Offline bool + Patched bool + Port int + ResourceControl meta.ResourceControl + SSHPort int + StatusPort int + func (s *TiKVSpec) GetMainPort() int + func (s *TiKVSpec) IgnoreMonitorAgent() bool + func (s *TiKVSpec) IsImported() bool + func (s *TiKVSpec) Labels() (map[string]string, error) + func (s *TiKVSpec) Role() string + func (s *TiKVSpec) SSH() (string, int) + func (s *TiKVSpec) Status(tlsCfg *tls.Config, pdList ...string) string + type TiSparkMasterComponent struct + Topology *Specification + func (c *TiSparkMasterComponent) Instances() []Instance + func (c *TiSparkMasterComponent) Name() string + func (c *TiSparkMasterComponent) Role() string + type TiSparkMasterInstance struct + func (i *TiSparkMasterInstance) GetCustomEnvs() map[string]string + func (i *TiSparkMasterInstance) GetCustomFields() map[string]interface{} + func (i *TiSparkMasterInstance) GetJavaHome() string + func (i *TiSparkMasterInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) (err error) + func (i *TiSparkMasterInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type TiSparkMasterSpec struct + Arch string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + JavaHome string + ListenHost string + OS string + Patched bool + Port int + SSHPort int + SparkConfigs map[string]interface{} + SparkEnvs map[string]string + WebPort int + func (s *TiSparkMasterSpec) GetMainPort() int + func (s *TiSparkMasterSpec) IgnoreMonitorAgent() bool + func (s *TiSparkMasterSpec) IsImported() bool + func (s *TiSparkMasterSpec) Role() string + func (s *TiSparkMasterSpec) SSH() (string, int) + type TiSparkWorkerComponent struct + Topology *Specification + func (c *TiSparkWorkerComponent) Instances() []Instance + func (c *TiSparkWorkerComponent) Name() string + func (c *TiSparkWorkerComponent) Role() string + type TiSparkWorkerInstance struct + func (i *TiSparkWorkerInstance) GetJavaHome() string + func (i *TiSparkWorkerInstance) InitConfig(ctx context.Context, e ctxt.Executor, ...) (err error) + func (i *TiSparkWorkerInstance) ScaleConfig(ctx context.Context, e ctxt.Executor, topo Topology, ...) error + type TiSparkWorkerSpec struct + Arch string + DeployDir string + Host string + IgnoreExporter bool + Imported bool + JavaHome string + ListenHost string + OS string + Patched bool + Port int + SSHPort int + WebPort int + func (s *TiSparkWorkerSpec) GetMainPort() int + func (s *TiSparkWorkerSpec) IgnoreMonitorAgent() bool + func (s *TiSparkWorkerSpec) IsImported() bool + func (s *TiSparkWorkerSpec) Role() string + func (s *TiSparkWorkerSpec) SSH() (string, int) + type Topology interface + BaseTopo func() *BaseTopo + ComponentsByStartOrder func() []Component + ComponentsByStopOrder func() []Component + ComponentsByUpdateOrder func() []Component + CountDir func(host string, dir string) int + FillHostArch func(hostArchmap map[string]string) error + GetMonitoredOptions func() *MonitoredOptions + IterInstance func(fn func(instance Instance)) + Merge func(that Topology) Topology + TLSConfig func(dir string) (*tls.Config, error) + Type func() string + Validate func() error + type UpgradableMetadata interface + SetUser func(u string) + SetVersion func(s string)