Documentation ¶
Index ¶
- func ValidateContextDirectory(srcPath string, excludes []string) error
- type AuthRequest
- type CommonFlags
- type CreateFlags
- type CreateOptions
- type HyperClient
- func (cli *HyperClient) Cmd(args ...string) error
- func (cli *HyperClient) ConvertYamlToJson(yamlBody []byte, container bool) ([]byte, error)
- func (cli *HyperClient) GetTag() string
- 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) HyperCmdLoad(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) HyperCmdPorts(args ...string) error
- func (cli *HyperClient) HyperCmdPull(args ...string) error
- func (cli *HyperClient) HyperCmdPush(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) HyperCmdSave(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) JsonFromCmdline(container bool, cmdArgs, cmdEnvs, cmdPortmaps []string, cmdLogDriver string, ...) (string, error)
- func (cli *HyperClient) JsonFromFile(filename string, container, yaml, k8s bool) (string, error)
- func (cli *HyperClient) ParseCommonOptions(opts *CommonFlags, container bool, args ...string) ([]byte, error)
- func (cli *HyperClient) PullImage(imageName string) error
- func (cli *HyperClient) PullImages(spec *apitype.UserPod) error
- type RunFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateContextDirectory ¶ added in v0.6.0
validateContextDirectory checks if all the contents of the directory can be read and returns an error if some files can't be read symlinks which point to non-existing files don't trigger an error
Types ¶
type AuthRequest ¶ added in v0.6.0
type AuthRequest func(authConfig types.AuthConfig) (io.ReadCloser, string, int, error)
type CommonFlags ¶ added in v0.8.0
type CommonFlags struct { PodFile string `short:"p" long:"podfile" value-name:"\"\"" description:"read spec from the pod file instead of command line"` Yaml bool `short:"y" long:"yaml" default-mask:"-" description:"pod file in Yaml format instead of JSON"` Name string `long:"name" value-name:"\"\"" description:"Assign a name to the container"` Workdir string `long:"workdir" value-name:"\"\"" default-mask:"-" description:"Working directory inside the container"` Tty bool `short:"t" long:"tty" default-mask:"-" description:"the run command in tty, such as bash shell"` ReadOnly bool `long:"read-only" default-mast:"-" description:"Create container with read-only rootfs"` Cpu int `long:"cpu" default:"1" value-name:"1" default-mask:"-" description:"CPU number for the VM"` Memory int `long:"memory" default:"128" value-name:"128" default-mask:"-" description:"Memory size (MB) for the VM"` Env []string `long:"env" value-name:"[]" default-mask:"-" description:"Set environment variables"` EntryPoint string `long:"entrypoint" value-name:"\"\"" default-mask:"-" description:"Overwrite the default ENTRYPOINT of the image"` RestartPolicy string `` /* 153-byte string literal not displayed */ LogDriver string `long:"log-driver" value-name:"\"\"" description:"Logging driver for Pod"` LogOpts []string `long:"log-opt" description:"Log driver options"` Portmap []string `` /* 152-byte string literal not displayed */ Labels []string `long:"label" value-name:"[]" default-mask:"-" description:"Add labels for Pod, format: --label key=value"` Volumes []string `` /* 174-byte string literal not displayed */ }
type CreateFlags ¶ added in v0.8.0
type CreateFlags struct { CommonFlags Container bool `short:"c" long:"container" default-mast:"-" description:"Create container inside a pod"` }
type CreateOptions ¶ added in v0.8.0
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, container bool) ([]byte, error)
func (*HyperClient) GetTag ¶
func (cli *HyperClient) GetTag() string
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
hyperctl 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 -m, --message= Commit message -p, --pause Pause container during Commit -h, --help Print usage
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) HyperCmdLoad ¶ added in v0.6.0
func (cli *HyperClient) HyperCmdLoad(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: hyperctl 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) HyperCmdPorts ¶ added in v1.0.0
func (cli *HyperClient) HyperCmdPorts(args ...string) error
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: hyperctl push NAME[:TAG]
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
hyperctl run [OPTIONS] image [COMMAND] [ARGS...]
func (*HyperClient) HyperCmdSave ¶ added in v0.8.0
func (cli *HyperClient) HyperCmdSave(args ...string) error
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) JsonFromCmdline ¶ added in v0.5.0
func (*HyperClient) JsonFromFile ¶ added in v0.5.0
func (cli *HyperClient) JsonFromFile(filename string, container, yaml, k8s bool) (string, error)
func (*HyperClient) ParseCommonOptions ¶ added in v0.8.0
func (cli *HyperClient) ParseCommonOptions(opts *CommonFlags, container bool, args ...string) ([]byte, 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(spec *apitype.UserPod) error
type RunFlags ¶ added in v0.8.0
type RunFlags struct { CommonFlags Attach bool `short:"a" long:"attach" default-mask:"-" description:"(from podfile) Attach the stdin, stdout and stderr to the container"` Detach bool `` /* 126-byte string literal not displayed */ Remove bool `long:"rm" default-mask:"-" description:"Automatically remove the pod when it exits"` }