kubeadm

package
v0.0.0-...-f44e7da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	KubeadmPath string
	// contains filtered or unexported fields
}

Client is a kubeadm client

NOTE: there is a hard timeout on all commands to kubeadm that only allow
      commands to run in the background for 60 minutes.

func NewClient

func NewClient() (Client, error)

NewClient creates a compliant new kubeadm client

func (Client) Run

func (c Client) Run(subcmd string, args ...string) (*command.Cmd, <-chan command.Status)

Run the command in the background with a channel for status and a timeout

func (Client) RunSynchronously

func (c Client) RunSynchronously(subcmd string, args ...string) (command.Status, error)

RunSynchronously runs the kubeadm command inline (with a timeout)

type KubeadmInterface

type KubeadmInterface interface {
	Run(subcmd string, args ...string) (*cmd.Cmd, <-chan cmd.Status)
	RunSynchronously(subcmd string, args ...string) (cmd.Status, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址