Documentation ¶
Index ¶
- Constants
- func CreateSSHKeyPair(log resources.LoggerFactory, state *types.StorageDocument) error
- func ExecuteScript(log resources.LoggerFactory, conn *ssh.Client, script string) (stdout string, stderr string, err error)
- func GenRandomString(length int) (string, error)
- func GenerateCerts(log resources.LoggerFactory, etcdMemPrivAddr []string) (caCert string, etcdCert string, etcdKey string, err error)
- func GenerateInitScriptForVM(resName string) (string, error)
- func GetUserName() string
- func IsValidName(clusterName string) error
- func NewScriptCollection() resources.ScriptCollection
- func UserInputCredentials(logging resources.LoggerFactory) (string, error)
- func ValidCNIPlugin(cni consts.KsctlValidCNIPlugin) bool
- func ValidateCloud(cloud consts.KsctlCloud) bool
- func ValidateDistro(distro consts.KsctlKubernetes) bool
- func ValidateStorage(storage consts.KsctlStore) bool
- func WriteKubeConfig(kubeconfig string) (string, error)
- type SSHCollection
- type SSHPayload
- func (sshPayload *SSHPayload) FastMode(mode bool) SSHCollection
- func (sshPayload *SSHPayload) Flag(execMethod consts.KsctlUtilsConsts) SSHCollection
- func (sshPayload *SSHPayload) GetOutput() []string
- func (sshPayload *SSHPayload) IPv4(ip string) SSHCollection
- func (sshPayload *SSHPayload) PrivateKey(s string)
- func (sshPayload *SSHPayload) SSHExecute(log resources.LoggerFactory) error
- func (sshPayload *SSHPayload) Script(s resources.ScriptCollection) SSHCollection
- func (sshPayload *SSHPayload) Username(s string)
- type Scripts
Constants ¶
View Source
const ( UserDir = "HOME" PathSeparator = "/" )
Variables ¶
This section is empty.
Functions ¶
func CreateSSHKeyPair ¶
func CreateSSHKeyPair(log resources.LoggerFactory, state *types.StorageDocument) error
func ExecuteScript ¶ added in v1.1.4
func GenRandomString ¶ added in v1.1.4
GenRandomString it generates RandomString
func GenerateCerts ¶ added in v1.1.4
func GenerateInitScriptForVM ¶ added in v1.1.4
func IsValidName ¶
func NewScriptCollection ¶ added in v1.1.4
func NewScriptCollection() resources.ScriptCollection
func UserInputCredentials ¶
func UserInputCredentials(logging resources.LoggerFactory) (string, error)
func ValidCNIPlugin ¶
func ValidCNIPlugin(cni consts.KsctlValidCNIPlugin) bool
func ValidateCloud ¶
func ValidateCloud(cloud consts.KsctlCloud) bool
func ValidateDistro ¶
func ValidateDistro(distro consts.KsctlKubernetes) bool
func ValidateStorage ¶
func ValidateStorage(storage consts.KsctlStore) bool
func WriteKubeConfig ¶
Types ¶
type SSHCollection ¶
type SSHCollection interface { SSHExecute(resources.LoggerFactory) error Flag(consts.KsctlUtilsConsts) SSHCollection Script(resources.ScriptCollection) SSHCollection FastMode(bool) SSHCollection Username(string) PrivateKey(string) GetOutput() []string IPv4(ip string) SSHCollection }
func NewSSHExecutor ¶ added in v1.1.4
func NewSSHExecutor(mainStateDocument *types.StorageDocument) SSHCollection
type SSHPayload ¶
type SSHPayload struct { UserName string Privatekey string PublicIP string Output []string // contains filtered or unexported fields }
func (*SSHPayload) FastMode ¶
func (sshPayload *SSHPayload) FastMode(mode bool) SSHCollection
func (*SSHPayload) Flag ¶
func (sshPayload *SSHPayload) Flag(execMethod consts.KsctlUtilsConsts) SSHCollection
func (*SSHPayload) GetOutput ¶
func (sshPayload *SSHPayload) GetOutput() []string
func (*SSHPayload) IPv4 ¶
func (sshPayload *SSHPayload) IPv4(ip string) SSHCollection
func (*SSHPayload) PrivateKey ¶
func (sshPayload *SSHPayload) PrivateKey(s string)
func (*SSHPayload) SSHExecute ¶
func (sshPayload *SSHPayload) SSHExecute(log resources.LoggerFactory) error
func (*SSHPayload) Script ¶
func (sshPayload *SSHPayload) Script(s resources.ScriptCollection) SSHCollection
func (*SSHPayload) Username ¶
func (sshPayload *SSHPayload) Username(s string)
type Scripts ¶ added in v1.1.4
type Scripts struct {
// contains filtered or unexported fields
}
Scripts is goroutine safe
func (*Scripts) IsCompleted ¶ added in v1.1.4
func (*Scripts) NextScript ¶ added in v1.1.4
func (*Scripts) TestAllScripts ¶ added in v1.1.4
Click to show internal directories.
Click to hide internal directories.