Documentation ¶
Index ¶
- Variables
- func Destroy(cfg KdkEnvConfig, force bool) error
- func Kubesync(cfg KdkEnvConfig)
- func Provision(cfg KdkEnvConfig) error
- func Prune(cfg KdkEnvConfig) error
- func Pull(cfg *KdkEnvConfig, force bool) error
- func Restart(cfg KdkEnvConfig)
- func Snapshot(cfg KdkEnvConfig) (string, error)
- func Ssh(cfg KdkEnvConfig)
- func Up(cfg KdkEnvConfig) (err error)
- func Update(cfg *KdkEnvConfig)
- func WarnIfUpdateAvailable(cfg *KdkEnvConfig)
- type AppConfig
- type KdkEnvConfig
- func (c *KdkEnvConfig) ConfigDir() (out string)
- func (c *KdkEnvConfig) ConfigPath() (out string)
- func (c *KdkEnvConfig) ConfigRootDir() (out string)
- func (c *KdkEnvConfig) CreateKdkConfig() (err error)
- func (c *KdkEnvConfig) CreateKdkSshKeyPair() (err error)
- func (c *KdkEnvConfig) Exec(command string) error
- func (c *KdkEnvConfig) Home() (out string)
- func (c *KdkEnvConfig) ImageCoordinates() (out string)
- func (c *KdkEnvConfig) Init()
- func (c *KdkEnvConfig) IsRunning() bool
- func (c *KdkEnvConfig) KeypairDir() (out string)
- func (c *KdkEnvConfig) PrivateKeyPath() (out string)
- func (c *KdkEnvConfig) PublicKeyPath() (out string)
- func (c *KdkEnvConfig) SCPCommandString() string
- func (c *KdkEnvConfig) SCPTo(hostPath, kdkPath string) error
- func (c *KdkEnvConfig) SSHCommandString() string
- func (c *KdkEnvConfig) SSHConnectionString() string
- func (c *KdkEnvConfig) Start()
- func (c *KdkEnvConfig) User() (out string)
- type ProgressDetail
- type ProgressMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "undefined" Port = strconv.Itoa(utils.GetPort()) )
Functions ¶
func Destroy ¶
func Destroy(cfg KdkEnvConfig, force bool) error
func Kubesync ¶
func Kubesync(cfg KdkEnvConfig)
func Provision ¶
func Provision(cfg KdkEnvConfig) error
func Prune ¶
func Prune(cfg KdkEnvConfig) error
func Pull ¶
func Pull(cfg *KdkEnvConfig, force bool) error
func Restart ¶
func Restart(cfg KdkEnvConfig)
func Snapshot ¶
func Snapshot(cfg KdkEnvConfig) (string, error)
func Ssh ¶
func Ssh(cfg KdkEnvConfig)
func Up ¶
func Up(cfg KdkEnvConfig) (err error)
func Update ¶
func Update(cfg *KdkEnvConfig)
func WarnIfUpdateAvailable ¶
func WarnIfUpdateAvailable(cfg *KdkEnvConfig)
Types ¶
type KdkEnvConfig ¶
type KdkEnvConfig struct { DockerClient *client.Client Ctx context.Context ConfigFile configFile SocksPort string }
func (*KdkEnvConfig) ConfigDir ¶
func (c *KdkEnvConfig) ConfigDir() (out string)
kdk container config dir (~/.kdk/<KDK_NAME>)
func (*KdkEnvConfig) ConfigPath ¶
func (c *KdkEnvConfig) ConfigPath() (out string)
kdk container config path (~/.kdk/<KDK_NAME>/config.yaml)
func (*KdkEnvConfig) ConfigRootDir ¶
func (c *KdkEnvConfig) ConfigRootDir() (out string)
kdk root config path (~/.kdk)
func (*KdkEnvConfig) CreateKdkConfig ¶
func (c *KdkEnvConfig) CreateKdkConfig() (err error)
func (*KdkEnvConfig) CreateKdkSshKeyPair ¶
func (c *KdkEnvConfig) CreateKdkSshKeyPair() (err error)
Creates KDK ssh keypair
func (*KdkEnvConfig) Exec ¶
func (c *KdkEnvConfig) Exec(command string) error
Executes a command on the KDK container
func (*KdkEnvConfig) ImageCoordinates ¶
func (c *KdkEnvConfig) ImageCoordinates() (out string)
kdk image coordinates (ciscosso/kdk:debian-latest)
func (*KdkEnvConfig) Init ¶
func (c *KdkEnvConfig) Init()
create docker client and context for easy reuse
func (*KdkEnvConfig) IsRunning ¶
func (c *KdkEnvConfig) IsRunning() bool
Checks that KDK container is running
func (*KdkEnvConfig) KeypairDir ¶
func (c *KdkEnvConfig) KeypairDir() (out string)
kdk keypair path path (~/.kdk/ssh)
func (*KdkEnvConfig) PrivateKeyPath ¶
func (c *KdkEnvConfig) PrivateKeyPath() (out string)
kdk private key path (~/.kdk/ssh/id_rsa)
func (*KdkEnvConfig) PublicKeyPath ¶
func (c *KdkEnvConfig) PublicKeyPath() (out string)
kdk public key path (~/.kdk/ssh/id_rsa.pub)
func (*KdkEnvConfig) SCPCommandString ¶
func (c *KdkEnvConfig) SCPCommandString() string
Returns SCP command string
func (*KdkEnvConfig) SCPTo ¶
func (c *KdkEnvConfig) SCPTo(hostPath, kdkPath string) error
SCP's a file into the KDK container
func (*KdkEnvConfig) SSHCommandString ¶
func (c *KdkEnvConfig) SSHCommandString() string
Returns SSH command string
func (*KdkEnvConfig) SSHConnectionString ¶
func (c *KdkEnvConfig) SSHConnectionString() string
Returns SSH connection string
func (*KdkEnvConfig) Start ¶
func (c *KdkEnvConfig) Start()
If KDK container is not running, start it and provision KDK user.
type ProgressDetail ¶
type ProgressMessage ¶
type ProgressMessage struct { ID string `json:"id"` Progress string `json:"progress"` ProgressDetail ProgressDetail `json:"progressDetail"` Status string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.