Documentation ¶
Index ¶
- Variables
- func GetExitCode(cli *HyperClient, container, tag string) error
- type HyperClient
- func (cli *HyperClient) Cmd(args ...string) error
- func (cli *HyperClient) ConvertYamlToJson(yamlBody []byte) ([]byte, error)
- func (cli *HyperClient) CreatePod(jsonbody string, remove bool) (string, error)
- func (cli *HyperClient) CreateVm(cpu, mem int, async bool) (id string, err error)
- func (cli *HyperClient) GetContainerByPod(podId string) (string, error)
- func (cli *HyperClient) GetPodInfo(podName string) (string, error)
- func (cli *HyperClient) GetTag() string
- func (cli *HyperClient) HTTPClient() *http.Client
- func (cli *HyperClient) HyperCmdAttach(args ...string) error
- func (cli *HyperClient) HyperCmdBuild(args ...string) error
- func (cli *HyperClient) HyperCmdCommit(args ...string) error
- func (cli *HyperClient) HyperCmdCreate(args ...string) error
- func (cli *HyperClient) HyperCmdExec(args ...string) error
- func (cli *HyperClient) HyperCmdHelp(args ...string) error
- func (cli *HyperClient) HyperCmdImages(args ...string) error
- func (cli *HyperClient) HyperCmdInfo(args ...string) error
- func (cli *HyperClient) HyperCmdKill(args ...string) error
- func (cli *HyperClient) HyperCmdList(args ...string) error
- func (cli *HyperClient) HyperCmdLogin(args ...string) error
- func (cli *HyperClient) HyperCmdLogout(args ...string) error
- func (cli *HyperClient) HyperCmdLogs(args ...string) error
- func (cli *HyperClient) HyperCmdPause(args ...string) error
- func (cli *HyperClient) HyperCmdPod(args ...string) error
- func (cli *HyperClient) HyperCmdPull(args ...string) error
- func (cli *HyperClient) HyperCmdPush(args ...string) error
- func (cli *HyperClient) HyperCmdReplace(args ...string) error
- func (cli *HyperClient) HyperCmdRm(args ...string) error
- func (cli *HyperClient) HyperCmdRmi(args ...string) error
- func (cli *HyperClient) HyperCmdRun(args ...string) error
- func (cli *HyperClient) HyperCmdStart(args ...string) error
- func (cli *HyperClient) HyperCmdStop(args ...string) error
- func (cli *HyperClient) HyperCmdUnpause(args ...string) error
- func (cli *HyperClient) HyperCmdVersion(args ...string) error
- func (cli *HyperClient) HyperCmdVm(args ...string) error
- func (cli *HyperClient) JsonFromCmdline(cmdArgs, cmdEnvs, cmdPortmaps []string, cmdLogDriver string, ...) (string, error)
- func (cli *HyperClient) JsonFromFile(filename string, yaml, k8s bool) (string, error)
- func (cli *HyperClient) PullImage(imageName string) error
- func (cli *HyperClient) PullImages(data string) error
- func (cli *HyperClient) RmPod(id string) error
- func (cli *HyperClient) RunPod(podstring string, autoremove bool) (string, error)
- func (cli *HyperClient) StartPod(podId, vmId string, tty bool) (string, error)
- func (cli *HyperClient) StopPod(podId, stopVm string) (int, string, error)
- type StatusError
Constants ¶
This section is empty.
Variables ¶
var (
ErrConnectionRefused = errors.New("Cannot connect to the Hyper daemon. Is 'hyperd' running on this host?")
)
Functions ¶
func GetExitCode ¶ added in v0.5.0
func GetExitCode(cli *HyperClient, container, tag string) error
Types ¶
type HyperClient ¶
type HyperClient struct {
// contains filtered or unexported fields
}
func NewHyperClient ¶
func NewHyperClient(proto, addr string, tlsConfig *tls.Config) *HyperClient
func (*HyperClient) Cmd ¶
func (cli *HyperClient) Cmd(args ...string) error
Cmd executes the specified command.
func (*HyperClient) ConvertYamlToJson ¶
func (cli *HyperClient) ConvertYamlToJson(yamlBody []byte) ([]byte, error)
func (*HyperClient) CreatePod ¶
func (cli *HyperClient) CreatePod(jsonbody string, remove bool) (string, error)
func (*HyperClient) CreateVm ¶ added in v0.5.0
func (cli *HyperClient) CreateVm(cpu, mem int, async bool) (id string, err error)
func (*HyperClient) GetContainerByPod ¶
func (cli *HyperClient) GetContainerByPod(podId string) (string, error)
func (*HyperClient) GetPodInfo ¶
func (cli *HyperClient) GetPodInfo(podName string) (string, error)
func (*HyperClient) GetTag ¶
func (cli *HyperClient) GetTag() string
func (*HyperClient) HTTPClient ¶
func (cli *HyperClient) HTTPClient() *http.Client
func (*HyperClient) HyperCmdAttach ¶
func (cli *HyperClient) HyperCmdAttach(args ...string) error
func (*HyperClient) HyperCmdBuild ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdBuild(args ...string) error
hyper build [OPTIONS] PATH
func (*HyperClient) HyperCmdCommit ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdCommit(args ...string) error
-a, --author= Author (e.g., "Hello World <hello@a-team.com>") -c, --change=[] Apply Dockerfile instruction to the created image --help=false Print usage -m, --message= Commit message -p, --pause=true Pause container during Commit
func (*HyperClient) HyperCmdCreate ¶
func (cli *HyperClient) HyperCmdCreate(args ...string) error
func (*HyperClient) HyperCmdExec ¶
func (cli *HyperClient) HyperCmdExec(args ...string) error
func (*HyperClient) HyperCmdHelp ¶
func (cli *HyperClient) HyperCmdHelp(args ...string) error
func (*HyperClient) HyperCmdImages ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdImages(args ...string) error
func (*HyperClient) HyperCmdInfo ¶
func (cli *HyperClient) HyperCmdInfo(args ...string) error
we need this *info* function to get the whole status from the hyper daemon
func (*HyperClient) HyperCmdKill ¶
func (cli *HyperClient) HyperCmdKill(args ...string) error
func (*HyperClient) HyperCmdList ¶
func (cli *HyperClient) HyperCmdList(args ...string) error
func (*HyperClient) HyperCmdLogin ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdLogin(args ...string) error
CmdLogin logs in or registers a user to a Docker registry service.
If no server is specified, the user will be logged into or registered to the registry's index server.
Usage: docker login SERVER
func (*HyperClient) HyperCmdLogout ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdLogout(args ...string) error
CmdLogout logs a user out from a Docker registry.
If no server is specified, the user will be logged out from the registry's index server.
Usage: hyper logout [SERVER]
func (*HyperClient) HyperCmdLogs ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdLogs(args ...string) error
func (*HyperClient) HyperCmdPause ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdPause(args ...string) error
func (*HyperClient) HyperCmdPod ¶
func (cli *HyperClient) HyperCmdPod(args ...string) error
We need to process the POD json data with the given file
func (*HyperClient) HyperCmdPull ¶
func (cli *HyperClient) HyperCmdPull(args ...string) error
func (*HyperClient) HyperCmdPush ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdPush(args ...string) error
CmdPush pushes an image or repository to the registry.
Usage: hyper push NAME[:TAG]
func (*HyperClient) HyperCmdReplace ¶
func (cli *HyperClient) HyperCmdReplace(args ...string) error
func (*HyperClient) HyperCmdRm ¶
func (cli *HyperClient) HyperCmdRm(args ...string) error
func (*HyperClient) HyperCmdRmi ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdRmi(args ...string) error
func (*HyperClient) HyperCmdRun ¶
func (cli *HyperClient) HyperCmdRun(args ...string) error
hyper run [OPTIONS] image [COMMAND] [ARGS...]
func (*HyperClient) HyperCmdStart ¶
func (cli *HyperClient) HyperCmdStart(args ...string) error
func (*HyperClient) HyperCmdStop ¶
func (cli *HyperClient) HyperCmdStop(args ...string) error
func (*HyperClient) HyperCmdUnpause ¶ added in v0.5.0
func (cli *HyperClient) HyperCmdUnpause(args ...string) error
func (*HyperClient) HyperCmdVersion ¶
func (cli *HyperClient) HyperCmdVersion(args ...string) error
func (*HyperClient) HyperCmdVm ¶
func (cli *HyperClient) HyperCmdVm(args ...string) error
func (*HyperClient) JsonFromCmdline ¶ added in v0.5.0
func (*HyperClient) JsonFromFile ¶ added in v0.5.0
func (cli *HyperClient) JsonFromFile(filename string, yaml, k8s bool) (string, error)
func (*HyperClient) PullImage ¶ added in v0.5.0
func (cli *HyperClient) PullImage(imageName string) error
func (*HyperClient) PullImages ¶ added in v0.5.0
func (cli *HyperClient) PullImages(data string) error
func (*HyperClient) RmPod ¶ added in v0.5.0
func (cli *HyperClient) RmPod(id string) error
func (*HyperClient) RunPod ¶
func (cli *HyperClient) RunPod(podstring string, autoremove bool) (string, error)
type StatusError ¶ added in v0.5.0
An StatusError reports an unsuccessful exit by a command.
func (StatusError) Error ¶ added in v0.5.0
func (e StatusError) Error() string