Documentation
¶
Index ¶
- Constants
- Variables
- func CheckClusterNameExist(name string) bool
- func CheckClusterNameValid(name string) bool
- func GetLatestVerFromCurl() (string, error)
- func NewSSH_Key(user, privateKeyPath, host string, port int) (*ssh.Client, error)
- func NewSSH_PW(user, password, host string, port int) (*ssh.Client, error)
- func NewSftpClient(sshClient *ssh.Client) (*sftp.Client, error)
- func NewSshSession(sshClient *ssh.Client) (*ssh.Session, error)
- func SaveClusterOptionsToFile(filename string, cluster ClusterOptions) error
- func UploadFile(ip string, localFilePath string, remoteDir string, sftpClient *sftp.Client) error
- type ClusterOptions
- type SSHType
- type StartOptions
Constants ¶
View Source
const ( SshEnvUser = "OPENGEMINI_SSH_USER" SshEnvKey = "OPENGEMINI_SSH_KEY" SshEnvPW = "OPENGEMINI_SSH_PW" )
env
View Source
const ( DownloadWeb = "https://github.com/openGemini/openGemini/releases/download" DownloadFillChar = "openGemini-" DownloadPkgSuffix = ".tar.gz" // fixed values DownloadTimeout = 2 * time.Minute // default values DownloadLatestUrl = "https://github.com/openGemini/openGemini/releases/latest" DownloadDefaultOs = "linux" DownloadDefaultArch = "amd64" )
downloader
View Source
const ( LocalBinRelPath = "usr/bin" LocalEtcRelPath = "etc" LocalConfName = "openGemini.conf" )
local
View Source
const ( RemoteMetaConfName = "openGemini-meta.conf" RemoteSqlConfName = "openGemini-sql.conf" RemoteStoreConfName = "openGemini-store.conf" )
config
View Source
const ( TsMeta = "ts-meta" // process name & bin file name TsSql = "ts-sql" TsStore = "ts-store" InstallScript = "install.sh" )
file name
View Source
const ( // gemix RemoteBinRelPath = "bin" RemoteEtcRelPath = "etc" // openGemini RemotePidPath = "pid" RemotePidSuffix = ".pid" RemoteLogSuffix = ".log" MetaExtraLog = "meta_extra" SqlExtraLog = "sql_extra" StoreExtraLog = "store_extra" )
remote
Variables ¶
View Source
var ( ErrUnexpectedNil = errors.New("unexpected nil value") ErrNoSshClient = errors.New("no ssh client") ErrNoSftpSession = errors.New("no sftp session") ErrUnknowSSHType = errors.New("unknow ssh type") )
View Source
var ClusterInfoDir string
View Source
var DownloadDst string
View Source
var InstallScriptPath string
Functions ¶
func CheckClusterNameExist ¶
func CheckClusterNameValid ¶
func GetLatestVerFromCurl ¶
func SaveClusterOptionsToFile ¶
func SaveClusterOptionsToFile(filename string, cluster ClusterOptions) error
Types ¶
type ClusterOptions ¶
type ClusterOptions struct { Name string Version string User string Key string Password string SshType SSHType YamlPath string }
func LoadClusterOptionsFromFile ¶
func LoadClusterOptionsFromFile(filename string) (ClusterOptions, error)
type StartOptions ¶
Click to show internal directories.
Click to hide internal directories.