Documentation
¶
Index ¶
- func GetScript(filename string) ([]byte, error)
- type AlertManagerScript
- func (c *AlertManagerScript) AppendEndpoints(ends []*AlertManagerScript) *AlertManagerScript
- func (c *AlertManagerScript) Config() ([]byte, error)
- func (c *AlertManagerScript) ConfigToFile(file string) error
- func (c *AlertManagerScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *AlertManagerScript) WithClusterPort(port int) *AlertManagerScript
- func (c *AlertManagerScript) WithNumaNode(numa string) *AlertManagerScript
- func (c *AlertManagerScript) WithWebPort(port int) *AlertManagerScript
- type BlackboxExporterScript
- func (c *BlackboxExporterScript) Config() ([]byte, error)
- func (c *BlackboxExporterScript) ConfigToFile(file string) error
- func (c *BlackboxExporterScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *BlackboxExporterScript) WithNumaNode(numa string) *BlackboxExporterScript
- func (c *BlackboxExporterScript) WithPort(port uint64) *BlackboxExporterScript
- type CDCScript
- func (c *CDCScript) AppendEndpoints(ends ...*PDScript) *CDCScript
- func (c *CDCScript) Config() ([]byte, error)
- func (c *CDCScript) ConfigToFile(file string) error
- func (c *CDCScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *CDCScript) PatchByVersion(clusterVersion, dataDir string) *CDCScript
- func (c *CDCScript) WithConfigFileEnabled() *CDCScript
- func (c *CDCScript) WithDataDir(dataDir string) *CDCScript
- func (c *CDCScript) WithDataDirEnabled() *CDCScript
- func (c *CDCScript) WithNumaNode(numa string) *CDCScript
- func (c *CDCScript) WithPort(port int) *CDCScript
- type DMMasterScaleScript
- func (c *DMMasterScaleScript) AppendEndpoints(ends ...*DMMasterScript) *DMMasterScaleScript
- func (c *DMMasterScaleScript) Config() ([]byte, error)
- func (c *DMMasterScaleScript) ConfigToFile(file string) error
- func (c *DMMasterScaleScript) WithNumaNode(numa string) *DMMasterScaleScript
- func (c *DMMasterScaleScript) WithPeerPort(port int) *DMMasterScaleScript
- func (c *DMMasterScaleScript) WithPort(port int) *DMMasterScaleScript
- func (c *DMMasterScaleScript) WithScheme(scheme string) *DMMasterScaleScript
- type DMMasterScript
- func (c *DMMasterScript) AppendEndpoints(ends ...*DMMasterScript) *DMMasterScript
- func (c *DMMasterScript) Config() ([]byte, error)
- func (c *DMMasterScript) ConfigToFile(file string) error
- func (c *DMMasterScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *DMMasterScript) WithNumaNode(numa string) *DMMasterScript
- func (c *DMMasterScript) WithPeerPort(port int) *DMMasterScript
- func (c *DMMasterScript) WithPort(port int) *DMMasterScript
- func (c *DMMasterScript) WithScheme(scheme string) *DMMasterScript
- func (c *DMMasterScript) WithV1SourcePath(path string) *DMMasterScript
- type DMWorkerScript
- func (c *DMWorkerScript) AppendEndpoints(ends ...*DMMasterScript) *DMWorkerScript
- func (c *DMWorkerScript) Config() ([]byte, error)
- func (c *DMWorkerScript) ConfigToFile(file string) error
- func (c *DMWorkerScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *DMWorkerScript) WithNumaNode(numa string) *DMWorkerScript
- func (c *DMWorkerScript) WithPort(port int) *DMWorkerScript
- type DrainerScript
- func (c *DrainerScript) AppendEndpoints(ends ...*PDScript) *DrainerScript
- func (c *DrainerScript) Config() ([]byte, error)
- func (c *DrainerScript) ConfigToFile(file string) error
- func (c *DrainerScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *DrainerScript) WithCommitTs(ts int64) *DrainerScript
- func (c *DrainerScript) WithNumaNode(numa string) *DrainerScript
- func (c *DrainerScript) WithPort(port int) *DrainerScript
- type GrafanaScript
- func (c *GrafanaScript) Config() ([]byte, error)
- func (c *GrafanaScript) ConfigToFile(file string) error
- func (c *GrafanaScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *GrafanaScript) WithNumaNode(numa string) *GrafanaScript
- func (c *GrafanaScript) WithTPLFile(file string) *GrafanaScript
- type NodeExporterScript
- func (c *NodeExporterScript) Config() ([]byte, error)
- func (c *NodeExporterScript) ConfigToFile(file string) error
- func (c *NodeExporterScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *NodeExporterScript) WithNumaNode(numa string) *NodeExporterScript
- func (c *NodeExporterScript) WithPort(port uint64) *NodeExporterScript
- type PDScaleScript
- type PDScript
- func (c *PDScript) AppendEndpoints(ends ...*PDScript) *PDScript
- func (c *PDScript) Config() ([]byte, error)
- func (c *PDScript) ConfigToFile(file string) error
- func (c *PDScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *PDScript) WithAdvertiseClientAddr(addr string) *PDScript
- func (c *PDScript) WithAdvertisePeerAddr(addr string) *PDScript
- func (c *PDScript) WithClientPort(port int) *PDScript
- func (c *PDScript) WithListenHost(listenHost string) *PDScript
- func (c *PDScript) WithNumaNode(numa string) *PDScript
- func (c *PDScript) WithPeerPort(port int) *PDScript
- func (c *PDScript) WithScheme(scheme string) *PDScript
- type PrometheusScript
- func (c *PrometheusScript) Config() ([]byte, error)
- func (c *PrometheusScript) ConfigToFile(file string) error
- func (c *PrometheusScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *PrometheusScript) WithNG(ngPort int) *PrometheusScript
- func (c *PrometheusScript) WithNumaNode(numa string) *PrometheusScript
- func (c *PrometheusScript) WithPort(port int) *PrometheusScript
- func (c *PrometheusScript) WithRetention(retention string) *PrometheusScript
- func (c *PrometheusScript) WithTPLFile(fname string) *PrometheusScript
- type PumpScript
- func (c *PumpScript) AppendEndpoints(ends ...*PDScript) *PumpScript
- func (c *PumpScript) Config() ([]byte, error)
- func (c *PumpScript) ConfigToFile(file string) error
- func (c *PumpScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *PumpScript) WithNumaNode(numa string) *PumpScript
- func (c *PumpScript) WithPort(port int) *PumpScript
- type TiDBScript
- func (c *TiDBScript) AppendEndpoints(ends ...*PDScript) *TiDBScript
- func (c *TiDBScript) Config() ([]byte, error)
- func (c *TiDBScript) ConfigToFile(file string) error
- func (c *TiDBScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *TiDBScript) WithAdvertiseAddr(addr string) *TiDBScript
- func (c *TiDBScript) WithListenHost(listenHost string) *TiDBScript
- func (c *TiDBScript) WithNumaNode(numa string) *TiDBScript
- func (c *TiDBScript) WithPort(port int) *TiDBScript
- func (c *TiDBScript) WithStatusPort(port int) *TiDBScript
- type TiFlashScript
- func (c *TiFlashScript) AppendEndpoints(ends ...*PDScript) *TiFlashScript
- func (c *TiFlashScript) Config() ([]byte, error)
- func (c *TiFlashScript) ConfigToFile(file string) error
- func (c *TiFlashScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *TiFlashScript) WithFlashProxyPort(port int) *TiFlashScript
- func (c *TiFlashScript) WithFlashProxyStatusPort(port int) *TiFlashScript
- func (c *TiFlashScript) WithFlashServicePort(port int) *TiFlashScript
- func (c *TiFlashScript) WithHTTPPort(port int) *TiFlashScript
- func (c *TiFlashScript) WithNumaNode(numa string) *TiFlashScript
- func (c *TiFlashScript) WithStatusPort(port int) *TiFlashScript
- func (c *TiFlashScript) WithTCPPort(port int) *TiFlashScript
- func (c *TiFlashScript) WithTmpDir(tmpDir string) *TiFlashScript
- type TiKVScript
- func (c *TiKVScript) AppendEndpoints(ends ...*PDScript) *TiKVScript
- func (c *TiKVScript) Config() ([]byte, error)
- func (c *TiKVScript) ConfigToFile(file string) error
- func (c *TiKVScript) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *TiKVScript) WithAdvertiseAddr(addr string) *TiKVScript
- func (c *TiKVScript) WithAdvertiseStatusAddr(addr string) *TiKVScript
- func (c *TiKVScript) WithListenHost(listenHost string) *TiKVScript
- func (c *TiKVScript) WithNumaNode(numa string) *TiKVScript
- type TiSparkEnv
- func (c *TiSparkEnv) Script() ([]byte, error)
- func (c *TiSparkEnv) ScriptToFile(file string) error
- func (c *TiSparkEnv) ScriptWithTemplate(tpl string) ([]byte, error)
- func (c *TiSparkEnv) SlaveScriptWithTemplate() ([]byte, error)
- func (c *TiSparkEnv) WithCustomEnv(m map[string]string) *TiSparkEnv
- func (c *TiSparkEnv) WithLocalIP(ip string) *TiSparkEnv
- func (c *TiSparkEnv) WithMaster(master string) *TiSparkEnv
- func (c *TiSparkEnv) WithMasterPorts(port, ui int) *TiSparkEnv
- func (c *TiSparkEnv) WithWorkerPorts(port, ui int) *TiSparkEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlertManagerScript ¶
type AlertManagerScript struct { IP string WebPort int ClusterPort int DeployDir string DataDir string LogDir string NumaNode string TLSEnabled bool EndPoints []*AlertManagerScript }
AlertManagerScript represent the data to generate AlertManager start script
func NewAlertManagerScript ¶
func NewAlertManagerScript(ip, deployDir, dataDir, logDir string, enableTLS bool) *AlertManagerScript
NewAlertManagerScript returns a AlertManagerScript with given arguments
func (*AlertManagerScript) AppendEndpoints ¶
func (c *AlertManagerScript) AppendEndpoints(ends []*AlertManagerScript) *AlertManagerScript
AppendEndpoints add new alert manager to Endpoints field
func (*AlertManagerScript) Config ¶
func (c *AlertManagerScript) Config() ([]byte, error)
Config generate the config file data.
func (*AlertManagerScript) ConfigToFile ¶
func (c *AlertManagerScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*AlertManagerScript) ConfigWithTemplate ¶
func (c *AlertManagerScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the AlertManager config content by tpl
func (*AlertManagerScript) WithClusterPort ¶
func (c *AlertManagerScript) WithClusterPort(port int) *AlertManagerScript
WithClusterPort set WebPort field of AlertManagerScript
func (*AlertManagerScript) WithNumaNode ¶
func (c *AlertManagerScript) WithNumaNode(numa string) *AlertManagerScript
WithNumaNode set NumaNode field of AlertManagerScript
func (*AlertManagerScript) WithWebPort ¶
func (c *AlertManagerScript) WithWebPort(port int) *AlertManagerScript
WithWebPort set WebPort field of AlertManagerScript
type BlackboxExporterScript ¶
BlackboxExporterScript represent the data to generate BlackboxExporter config
func NewBlackboxExporterScript ¶
func NewBlackboxExporterScript(deployDir, logDir string) *BlackboxExporterScript
NewBlackboxExporterScript returns a BlackboxExporterScript with given arguments
func (*BlackboxExporterScript) Config ¶
func (c *BlackboxExporterScript) Config() ([]byte, error)
Config generate the config file data.
func (*BlackboxExporterScript) ConfigToFile ¶
func (c *BlackboxExporterScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*BlackboxExporterScript) ConfigWithTemplate ¶
func (c *BlackboxExporterScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the BlackboxExporter config content by tpl
func (*BlackboxExporterScript) WithNumaNode ¶
func (c *BlackboxExporterScript) WithNumaNode(numa string) *BlackboxExporterScript
WithNumaNode set NumaNode field of BlackboxExporterScript
func (*BlackboxExporterScript) WithPort ¶
func (c *BlackboxExporterScript) WithPort(port uint64) *BlackboxExporterScript
WithPort set WebPort field of BlackboxExporterScript
type CDCScript ¶
type CDCScript struct { IP string Port int DeployDir string LogDir string DataDir string NumaNode string GCTTL int64 TZ string TLSEnabled bool Endpoints []*PDScript ConfigFileEnabled bool DataDirEnabled bool }
CDCScript represent the data to generate cdc config
func NewCDCScript ¶
NewCDCScript returns a CDCScript with given arguments
func (*CDCScript) AppendEndpoints ¶
AppendEndpoints add new PDScript to Endpoints field
func (*CDCScript) ConfigToFile ¶
ConfigToFile write config content to specific file.
func (*CDCScript) ConfigWithTemplate ¶
ConfigWithTemplate generate the CDC config content by tpl
func (*CDCScript) PatchByVersion ¶ added in v1.5.0
PatchByVersion update fields by cluster version
func (*CDCScript) WithConfigFileEnabled ¶ added in v1.4.1
WithConfigFileEnabled enables config file
func (*CDCScript) WithDataDir ¶ added in v1.5.0
WithDataDir set DataDir field of TiCDCScript
func (*CDCScript) WithDataDirEnabled ¶ added in v1.5.0
WithDataDirEnabled enables CDC data-dir
func (*CDCScript) WithNumaNode ¶
WithNumaNode set NumaNode field of TiCDCScript
type DMMasterScaleScript ¶
type DMMasterScaleScript struct {
DMMasterScript
}
DMMasterScaleScript represent the data to generate dm-master config on scaling
func NewDMMasterScaleScript ¶
func NewDMMasterScaleScript(name, ip, deployDir, dataDir, logDir string) *DMMasterScaleScript
NewDMMasterScaleScript return a new DMMasterScaleScript
func (*DMMasterScaleScript) AppendEndpoints ¶
func (c *DMMasterScaleScript) AppendEndpoints(ends ...*DMMasterScript) *DMMasterScaleScript
AppendEndpoints add new DMMasterScript to Endpoints field
func (*DMMasterScaleScript) Config ¶
func (c *DMMasterScaleScript) Config() ([]byte, error)
Config generate the config file data.
func (*DMMasterScaleScript) ConfigToFile ¶
func (c *DMMasterScaleScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*DMMasterScaleScript) WithNumaNode ¶
func (c *DMMasterScaleScript) WithNumaNode(numa string) *DMMasterScaleScript
WithNumaNode set NumaNode field of DMMasterScript
func (*DMMasterScaleScript) WithPeerPort ¶
func (c *DMMasterScaleScript) WithPeerPort(port int) *DMMasterScaleScript
WithPeerPort set PeerPort field of DMMasterScript
func (*DMMasterScaleScript) WithPort ¶
func (c *DMMasterScaleScript) WithPort(port int) *DMMasterScaleScript
WithPort set Port field of DMMasterScript
func (*DMMasterScaleScript) WithScheme ¶
func (c *DMMasterScaleScript) WithScheme(scheme string) *DMMasterScaleScript
WithScheme set Scheme field of DMMasterScaleScript
type DMMasterScript ¶
type DMMasterScript struct { Name string Scheme string IP string Port int PeerPort int DeployDir string DataDir string LogDir string NumaNode string V1SourcePath string Endpoints []*DMMasterScript }
DMMasterScript represent the data to generate TiDB config
func NewDMMasterScript ¶
func NewDMMasterScript(name, ip, deployDir, dataDir, logDir string) *DMMasterScript
NewDMMasterScript returns a DMMasterScript with given arguments
func (*DMMasterScript) AppendEndpoints ¶
func (c *DMMasterScript) AppendEndpoints(ends ...*DMMasterScript) *DMMasterScript
AppendEndpoints add new DMMasterScript to Endpoints field
func (*DMMasterScript) Config ¶
func (c *DMMasterScript) Config() ([]byte, error)
Config generate the config file data.
func (*DMMasterScript) ConfigToFile ¶
func (c *DMMasterScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*DMMasterScript) ConfigWithTemplate ¶
func (c *DMMasterScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the TiDB config content by tpl
func (*DMMasterScript) WithNumaNode ¶
func (c *DMMasterScript) WithNumaNode(numa string) *DMMasterScript
WithNumaNode set NumaNode field of DMMasterScript
func (*DMMasterScript) WithPeerPort ¶
func (c *DMMasterScript) WithPeerPort(port int) *DMMasterScript
WithPeerPort set PeerPort field of DMMasterScript
func (*DMMasterScript) WithPort ¶
func (c *DMMasterScript) WithPort(port int) *DMMasterScript
WithPort set Port field of DMMasterScript
func (*DMMasterScript) WithScheme ¶
func (c *DMMasterScript) WithScheme(scheme string) *DMMasterScript
WithScheme set Scheme field of NewDMMasterScript
func (*DMMasterScript) WithV1SourcePath ¶ added in v1.1.0
func (c *DMMasterScript) WithV1SourcePath(path string) *DMMasterScript
WithV1SourcePath set Scheme field of V1SourcePath
type DMWorkerScript ¶
type DMWorkerScript struct { Name string IP string Port int DeployDir string LogDir string NumaNode string Endpoints []*DMMasterScript }
DMWorkerScript represent the data to generate TiDB config
func NewDMWorkerScript ¶
func NewDMWorkerScript(name, ip, deployDir, logDir string) *DMWorkerScript
NewDMWorkerScript returns a DMWorkerScript with given arguments
func (*DMWorkerScript) AppendEndpoints ¶
func (c *DMWorkerScript) AppendEndpoints(ends ...*DMMasterScript) *DMWorkerScript
AppendEndpoints add new PDScript to Endpoints field
func (*DMWorkerScript) Config ¶
func (c *DMWorkerScript) Config() ([]byte, error)
Config generate the config file data.
func (*DMWorkerScript) ConfigToFile ¶
func (c *DMWorkerScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*DMWorkerScript) ConfigWithTemplate ¶
func (c *DMWorkerScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the DM worker config content by tpl
func (*DMWorkerScript) WithNumaNode ¶
func (c *DMWorkerScript) WithNumaNode(numa string) *DMWorkerScript
WithNumaNode set NumaNode field of DMWorkerScript
func (*DMWorkerScript) WithPort ¶
func (c *DMWorkerScript) WithPort(port int) *DMWorkerScript
WithPort set Port field of DMWorkerScript
type DrainerScript ¶
type DrainerScript struct { NodeID string IP string Port int DeployDir string DataDir string LogDir string NumaNode string CommitTs int64 Endpoints []*PDScript }
DrainerScript represent the data to generate drainer config
func NewDrainerScript ¶
func NewDrainerScript(nodeID, ip, deployDir, dataDir, logDir string) *DrainerScript
NewDrainerScript returns a DrainerScript with given arguments
func (*DrainerScript) AppendEndpoints ¶
func (c *DrainerScript) AppendEndpoints(ends ...*PDScript) *DrainerScript
AppendEndpoints add new DrainerScript to Endpoints field
func (*DrainerScript) Config ¶
func (c *DrainerScript) Config() ([]byte, error)
Config generate the config file data.
func (*DrainerScript) ConfigToFile ¶
func (c *DrainerScript) ConfigToFile(file string) error
ConfigToFile write config content to specific file.
func (*DrainerScript) ConfigWithTemplate ¶
func (c *DrainerScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Drainer config content by tpl
func (*DrainerScript) WithCommitTs ¶
func (c *DrainerScript) WithCommitTs(ts int64) *DrainerScript
WithCommitTs set CommitTs field of DrainerScript
func (*DrainerScript) WithNumaNode ¶
func (c *DrainerScript) WithNumaNode(numa string) *DrainerScript
WithNumaNode set NumaNode field of DrainerScript
func (*DrainerScript) WithPort ¶
func (c *DrainerScript) WithPort(port int) *DrainerScript
WithPort set Port field of DrainerScript
type GrafanaScript ¶
type GrafanaScript struct { ClusterName string DeployDir string NumaNode string // contains filtered or unexported fields }
GrafanaScript represent the data to generate Grafana config
func NewGrafanaScript ¶
func NewGrafanaScript(cluster, deployDir string) *GrafanaScript
NewGrafanaScript returns a GrafanaScript with given arguments
func (*GrafanaScript) Config ¶
func (c *GrafanaScript) Config() ([]byte, error)
Config generate the config file data.
func (*GrafanaScript) ConfigToFile ¶
func (c *GrafanaScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*GrafanaScript) ConfigWithTemplate ¶
func (c *GrafanaScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Grafana config content by tpl
func (*GrafanaScript) WithNumaNode ¶
func (c *GrafanaScript) WithNumaNode(numa string) *GrafanaScript
WithNumaNode set NumaNode field of GrafanaScript
func (*GrafanaScript) WithTPLFile ¶ added in v1.1.0
func (c *GrafanaScript) WithTPLFile(file string) *GrafanaScript
WithTPLFile set the template file.
type NodeExporterScript ¶
NodeExporterScript represent the data to generate NodeExporter config
func NewNodeExporterScript ¶
func NewNodeExporterScript(deployDir, logDir string) *NodeExporterScript
NewNodeExporterScript returns a NodeExporterScript with given arguments
func (*NodeExporterScript) Config ¶
func (c *NodeExporterScript) Config() ([]byte, error)
Config generate the config file data.
func (*NodeExporterScript) ConfigToFile ¶
func (c *NodeExporterScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*NodeExporterScript) ConfigWithTemplate ¶
func (c *NodeExporterScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the NodeExporter config content by tpl
func (*NodeExporterScript) WithNumaNode ¶
func (c *NodeExporterScript) WithNumaNode(numa string) *NodeExporterScript
WithNumaNode set NumaNode field of NodeExporterScript
func (*NodeExporterScript) WithPort ¶
func (c *NodeExporterScript) WithPort(port uint64) *NodeExporterScript
WithPort set Port field of NodeExporterScript
type PDScaleScript ¶
type PDScaleScript struct {
PDScript
}
PDScaleScript represent the data to generate pd config on scaling
func NewPDScaleScript ¶
func NewPDScaleScript(pdScript *PDScript) *PDScaleScript
NewPDScaleScript return a new PDScaleScript
func (*PDScaleScript) Config ¶
func (c *PDScaleScript) Config() ([]byte, error)
Config generate the config file data.
func (*PDScaleScript) ConfigToFile ¶
func (c *PDScaleScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
type PDScript ¶
type PDScript struct { Name string Scheme string IP string ListenHost string AdvertiseClientAddr string AdvertisePeerAddr string ClientPort int PeerPort int DeployDir string DataDir string LogDir string NumaNode string Endpoints []*PDScript }
PDScript represent the data to generate pd config
func NewPDScript ¶
NewPDScript returns a PDScript with given arguments
func (*PDScript) AppendEndpoints ¶
AppendEndpoints add new PDScript to Endpoints field
func (*PDScript) ConfigToFile ¶
ConfigToFile write config content to specific path
func (*PDScript) ConfigWithTemplate ¶
ConfigWithTemplate generate the PD config content by tpl
func (*PDScript) WithAdvertiseClientAddr ¶ added in v1.5.0
WithAdvertiseClientAddr set AdvertiseClientAddr field of PDScript
func (*PDScript) WithAdvertisePeerAddr ¶ added in v1.5.0
WithAdvertisePeerAddr set AdvertisePeerAddr field of PDScript
func (*PDScript) WithClientPort ¶
WithClientPort set ClientPort field of PDScript
func (*PDScript) WithListenHost ¶ added in v1.0.5
WithListenHost set listenHost field of PDScript
func (*PDScript) WithNumaNode ¶
WithNumaNode set NumaNode field of PDScript
func (*PDScript) WithPeerPort ¶
WithPeerPort set PeerPort field of PDScript
func (*PDScript) WithScheme ¶
WithScheme set Scheme field of PDScript
type PrometheusScript ¶
type PrometheusScript struct { IP string Port int DeployDir string DataDir string LogDir string NumaNode string Retention string EnableNG bool // contains filtered or unexported fields }
PrometheusScript represent the data to generate Prometheus config
func NewPrometheusScript ¶
func NewPrometheusScript(ip, deployDir, dataDir, logDir string) *PrometheusScript
NewPrometheusScript returns a PrometheusScript with given arguments
func (*PrometheusScript) Config ¶
func (c *PrometheusScript) Config() ([]byte, error)
Config generate the config file data.
func (*PrometheusScript) ConfigToFile ¶
func (c *PrometheusScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*PrometheusScript) ConfigWithTemplate ¶
func (c *PrometheusScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Prometheus config content by tpl
func (*PrometheusScript) WithNG ¶ added in v1.7.0
func (c *PrometheusScript) WithNG(ngPort int) *PrometheusScript
WithNG set if enable ng-monitoring.
func (*PrometheusScript) WithNumaNode ¶
func (c *PrometheusScript) WithNumaNode(numa string) *PrometheusScript
WithNumaNode set NumaNode field of PrometheusScript
func (*PrometheusScript) WithPort ¶
func (c *PrometheusScript) WithPort(port int) *PrometheusScript
WithPort set Port field of PrometheusScript
func (*PrometheusScript) WithRetention ¶ added in v1.1.0
func (c *PrometheusScript) WithRetention(retention string) *PrometheusScript
WithRetention set Retention field of PrometheusScript
func (*PrometheusScript) WithTPLFile ¶ added in v1.1.0
func (c *PrometheusScript) WithTPLFile(fname string) *PrometheusScript
WithTPLFile set the template file.
type PumpScript ¶
type PumpScript struct { NodeID string Host string Port int DeployDir string DataDir string LogDir string NumaNode string CommitTs int64 Endpoints []*PDScript }
PumpScript represent the data to generate Pump config
func NewPumpScript ¶
func NewPumpScript(nodeID, host, deployDir, dataDir, logDir string) *PumpScript
NewPumpScript returns a PumpScript with given arguments
func (*PumpScript) AppendEndpoints ¶
func (c *PumpScript) AppendEndpoints(ends ...*PDScript) *PumpScript
AppendEndpoints add new PumpScript to Endpoints field
func (*PumpScript) Config ¶
func (c *PumpScript) Config() ([]byte, error)
Config generate the config file data.
func (*PumpScript) ConfigToFile ¶
func (c *PumpScript) ConfigToFile(file string) error
ConfigToFile write config content to specific file.
func (*PumpScript) ConfigWithTemplate ¶
func (c *PumpScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the Pump config content by tpl
func (*PumpScript) WithNumaNode ¶
func (c *PumpScript) WithNumaNode(numa string) *PumpScript
WithNumaNode set NumaNode field of PumpScript
func (*PumpScript) WithPort ¶
func (c *PumpScript) WithPort(port int) *PumpScript
WithPort set Port field of PumpScript
type TiDBScript ¶
type TiDBScript struct { IP string ListenHost string AdvertiseAddr string Port int StatusPort int DeployDir string LogDir string NumaNode string Endpoints []*PDScript }
TiDBScript represent the data to generate TiDB config
func NewTiDBScript ¶
func NewTiDBScript(ip, deployDir, logDir string) *TiDBScript
NewTiDBScript returns a TiDBScript with given arguments
func (*TiDBScript) AppendEndpoints ¶
func (c *TiDBScript) AppendEndpoints(ends ...*PDScript) *TiDBScript
AppendEndpoints add new PDScript to Endpoints field
func (*TiDBScript) Config ¶
func (c *TiDBScript) Config() ([]byte, error)
Config generate the config file data.
func (*TiDBScript) ConfigToFile ¶
func (c *TiDBScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*TiDBScript) ConfigWithTemplate ¶
func (c *TiDBScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the TiDB config content by tpl
func (*TiDBScript) WithAdvertiseAddr ¶ added in v1.5.0
func (c *TiDBScript) WithAdvertiseAddr(addr string) *TiDBScript
WithAdvertiseAddr set AdvertiseAddr field of TiDBScript
func (*TiDBScript) WithListenHost ¶ added in v1.0.5
func (c *TiDBScript) WithListenHost(listenHost string) *TiDBScript
WithListenHost set ListenHost field of TiDBScript
func (*TiDBScript) WithNumaNode ¶
func (c *TiDBScript) WithNumaNode(numa string) *TiDBScript
WithNumaNode set NumaNode field of TiDBScript
func (*TiDBScript) WithPort ¶
func (c *TiDBScript) WithPort(port int) *TiDBScript
WithPort set Port field of TiDBScript
func (*TiDBScript) WithStatusPort ¶
func (c *TiDBScript) WithStatusPort(port int) *TiDBScript
WithStatusPort set StatusPort field of TiDBScript
type TiFlashScript ¶
type TiFlashScript struct { IP string TCPPort int HTTPPort int FlashServicePort int FlashProxyPort int FlashProxyStatusPort int StatusPort int DeployDir string DataDir string LogDir string TmpDir string NumaNode string Endpoints []*PDScript TiDBStatusAddrs string PDAddrs string }
TiFlashScript represent the data to generate TiFlash config
func NewTiFlashScript ¶
func NewTiFlashScript(ip, deployDir, dataDir string, logDir string, tidbStatusAddrs string, pdAddrs string) *TiFlashScript
NewTiFlashScript returns a TiFlashScript with given arguments
func (*TiFlashScript) AppendEndpoints ¶
func (c *TiFlashScript) AppendEndpoints(ends ...*PDScript) *TiFlashScript
AppendEndpoints add new PDScript to Endpoints field
func (*TiFlashScript) Config ¶
func (c *TiFlashScript) Config() ([]byte, error)
Config generate the config file data.
func (*TiFlashScript) ConfigToFile ¶
func (c *TiFlashScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*TiFlashScript) ConfigWithTemplate ¶
func (c *TiFlashScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the TiFlash config content by tpl
func (*TiFlashScript) WithFlashProxyPort ¶
func (c *TiFlashScript) WithFlashProxyPort(port int) *TiFlashScript
WithFlashProxyPort set FlashProxyPort field of TiFlashScript
func (*TiFlashScript) WithFlashProxyStatusPort ¶
func (c *TiFlashScript) WithFlashProxyStatusPort(port int) *TiFlashScript
WithFlashProxyStatusPort set FlashProxyStatusPort field of TiFlashScript
func (*TiFlashScript) WithFlashServicePort ¶
func (c *TiFlashScript) WithFlashServicePort(port int) *TiFlashScript
WithFlashServicePort set FlashServicePort field of TiFlashScript
func (*TiFlashScript) WithHTTPPort ¶
func (c *TiFlashScript) WithHTTPPort(port int) *TiFlashScript
WithHTTPPort set HTTPPort field of TiFlashScript
func (*TiFlashScript) WithNumaNode ¶
func (c *TiFlashScript) WithNumaNode(numa string) *TiFlashScript
WithNumaNode set NumaNode field of TiFlashScript
func (*TiFlashScript) WithStatusPort ¶
func (c *TiFlashScript) WithStatusPort(port int) *TiFlashScript
WithStatusPort set FlashProxyStatusPort field of TiFlashScript
func (*TiFlashScript) WithTCPPort ¶
func (c *TiFlashScript) WithTCPPort(port int) *TiFlashScript
WithTCPPort set TCPPort field of TiFlashScript
func (*TiFlashScript) WithTmpDir ¶
func (c *TiFlashScript) WithTmpDir(tmpDir string) *TiFlashScript
WithTmpDir set TmpDir field of TiFlashScript
type TiKVScript ¶
type TiKVScript struct { IP string ListenHost string AdvertiseAddr string AdvertiseStatusAddr string Port int StatusPort int DeployDir string DataDir string LogDir string SupportAdvertiseStatusAddr bool NumaNode string Endpoints []*PDScript }
TiKVScript represent the data to generate TiKV config
func NewTiKVScript ¶
func NewTiKVScript(version, ip string, port, statusPort int, deployDir, dataDir, logDir string) *TiKVScript
NewTiKVScript returns a TiKVScript with given arguments
func (*TiKVScript) AppendEndpoints ¶
func (c *TiKVScript) AppendEndpoints(ends ...*PDScript) *TiKVScript
AppendEndpoints add new PDScript to Endpoints field
func (*TiKVScript) Config ¶
func (c *TiKVScript) Config() ([]byte, error)
Config generate the config file data.
func (*TiKVScript) ConfigToFile ¶
func (c *TiKVScript) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*TiKVScript) ConfigWithTemplate ¶
func (c *TiKVScript) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the TiKV config content by tpl
func (*TiKVScript) WithAdvertiseAddr ¶ added in v1.5.0
func (c *TiKVScript) WithAdvertiseAddr(addr string) *TiKVScript
WithAdvertiseAddr set AdvertiseAddr of TiKVScript
func (*TiKVScript) WithAdvertiseStatusAddr ¶ added in v1.5.0
func (c *TiKVScript) WithAdvertiseStatusAddr(addr string) *TiKVScript
WithAdvertiseStatusAddr set AdvertiseStatusAddr of TiKVScript
func (*TiKVScript) WithListenHost ¶ added in v1.0.5
func (c *TiKVScript) WithListenHost(listenHost string) *TiKVScript
WithListenHost set ListenHost field of TiKVScript
func (*TiKVScript) WithNumaNode ¶
func (c *TiKVScript) WithNumaNode(numa string) *TiKVScript
WithNumaNode set NumaNode field of TiKVScript
type TiSparkEnv ¶ added in v1.0.9
type TiSparkEnv struct { Host string TiSparkMaster string TiSparkLocalIP string MasterPort int WorkerPort int MasterUIPort int WorkerUIPort int CustomEnvs map[string]string }
TiSparkEnv represent the data to generate TiSpark environment config
func NewTiSparkEnv ¶ added in v1.0.9
func NewTiSparkEnv(host string) *TiSparkEnv
NewTiSparkEnv returns a TiSparkConfig
func (*TiSparkEnv) Script ¶ added in v1.0.9
func (c *TiSparkEnv) Script() ([]byte, error)
Script generate the script file data.
func (*TiSparkEnv) ScriptToFile ¶ added in v1.0.9
func (c *TiSparkEnv) ScriptToFile(file string) error
ScriptToFile write script content to specific path
func (*TiSparkEnv) ScriptWithTemplate ¶ added in v1.0.9
func (c *TiSparkEnv) ScriptWithTemplate(tpl string) ([]byte, error)
ScriptWithTemplate parses the template file
func (*TiSparkEnv) SlaveScriptWithTemplate ¶ added in v1.0.9
func (c *TiSparkEnv) SlaveScriptWithTemplate() ([]byte, error)
SlaveScriptWithTemplate parses the template file
func (*TiSparkEnv) WithCustomEnv ¶ added in v1.0.9
func (c *TiSparkEnv) WithCustomEnv(m map[string]string) *TiSparkEnv
WithCustomEnv sets custom setting fields
func (*TiSparkEnv) WithLocalIP ¶ added in v1.0.9
func (c *TiSparkEnv) WithLocalIP(ip string) *TiSparkEnv
WithLocalIP sets custom setting fields
func (*TiSparkEnv) WithMaster ¶ added in v1.1.0
func (c *TiSparkEnv) WithMaster(master string) *TiSparkEnv
WithMaster sets master field
func (*TiSparkEnv) WithMasterPorts ¶ added in v1.0.9
func (c *TiSparkEnv) WithMasterPorts(port, ui int) *TiSparkEnv
WithMasterPorts sets port for masters
func (*TiSparkEnv) WithWorkerPorts ¶ added in v1.0.9
func (c *TiSparkEnv) WithWorkerPorts(port, ui int) *TiSparkEnv
WithWorkerPorts sets port for masters