Documentation ¶
Index ¶
- Constants
- type HyperClient
- func (c *HyperClient) AddService(podID string, services []*types.UserService) error
- func (c *HyperClient) ContainerExecCreate(container string, command []string, tty bool) (string, error)
- func (c *HyperClient) ContainerExecSignal(container, execID string, sig int64) error
- func (c *HyperClient) ContainerExecStart(containerId, execId string, stdin io.ReadCloser, stdout, stderr io.Writer, ...) error
- func (c *HyperClient) ContainerSignal(podID, containerID string, signal int64) error
- func (c *HyperClient) CreateContainer(podID string, spec *types.UserContainer) (string, error)
- func (c *HyperClient) CreatePod(spec *types.UserPod) (string, error)
- func (c *HyperClient) DeleteService(podID string, services []*types.UserService) error
- func (c *HyperClient) GetContainerInfo(container string) (*types.ContainerInfo, error)
- func (c *HyperClient) GetContainerList() ([]*types.ContainerListResult, error)
- func (c *HyperClient) GetContainerLogs(container string) ([]byte, error)
- func (c *HyperClient) GetImageList() ([]*types.ImageInfo, error)
- func (c *HyperClient) GetPodInfo(podID string) (*types.PodInfo, error)
- func (c *HyperClient) GetPodList() ([]*types.PodListResult, error)
- func (c *HyperClient) GetPodStats(podID string) (*types.PodStats, error)
- func (c *HyperClient) GetVMList() ([]*types.VMListResult, error)
- func (c *HyperClient) Info() (*types.InfoResponse, error)
- func (c *HyperClient) ListService(podID string) ([]*types.UserService, error)
- func (c *HyperClient) PausePod(podID string) error
- func (c *HyperClient) Ping() (*types.PingResponse, error)
- func (c *HyperClient) PodSignal(podID string, signal int64) error
- func (c *HyperClient) PostAttach(id string, tty bool) error
- func (c *HyperClient) PullImage(image, tag string, out io.Writer) error
- func (c *HyperClient) PushImage(repo, tag string, out io.Writer) error
- func (c *HyperClient) RemoveImage(image string) error
- func (c *HyperClient) RemovePod(podID string) error
- func (c *HyperClient) RenameContainer(oldName string, newName string) error
- func (c *HyperClient) SetPodLabels(podID string, override bool, labels map[string]string) error
- func (c *HyperClient) StartPod(podID string) error
- func (c *HyperClient) StopPod(podID string) (int, string, error)
- func (c *HyperClient) TTYResize(containerID, execID string, height, width int32) error
- func (c *HyperClient) UnpausePod(podID string) error
- func (c *HyperClient) UpdateService(podID string, services []*types.UserService) error
- func (c *HyperClient) Wait(container, processId string, noHang bool) (int32, error)
- type RawExtractor
- type StdcopyExtractor
- type StreamExtractor
Constants ¶
const ( // Stdin represents standard input stream type. Stdin stdcopy.StdType = iota // Stdout represents standard output stream type. Stdout // Stderr represents standard error steam type. Stderr )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HyperClient ¶
type HyperClient struct {
// contains filtered or unexported fields
}
HyperClient is the gRPC client for hyperd
func NewHyperClient ¶
func NewHyperClient(server string) (*HyperClient, error)
NewHyperClient creates a new *HyperClient
func (*HyperClient) AddService ¶ added in v0.6.2
func (c *HyperClient) AddService(podID string, services []*types.UserService) error
AddService adds user service by podID and service content
func (*HyperClient) ContainerExecCreate ¶ added in v0.6.2
func (c *HyperClient) ContainerExecCreate(container string, command []string, tty bool) (string, error)
ContainerExecCreate creates exec in a container
func (*HyperClient) ContainerExecSignal ¶ added in v0.8.0
func (c *HyperClient) ContainerExecSignal(container, execID string, sig int64) error
ContainerExecSignal sends signal to specified exec of specified container
func (*HyperClient) ContainerExecStart ¶ added in v0.6.2
func (c *HyperClient) ContainerExecStart(containerId, execId string, stdin io.ReadCloser, stdout, stderr io.Writer, tty bool) error
ContainerExecStart starts exec in a container with input stream in and output stream out
func (*HyperClient) ContainerSignal ¶ added in v0.8.0
func (c *HyperClient) ContainerSignal(podID, containerID string, signal int64) error
ContainerSignal sends a signal to specified container of specified pod
func (*HyperClient) CreateContainer ¶ added in v0.6.2
func (c *HyperClient) CreateContainer(podID string, spec *types.UserContainer) (string, error)
CreateContainer creates a container
func (*HyperClient) CreatePod ¶
func (c *HyperClient) CreatePod(spec *types.UserPod) (string, error)
CreatePod creates a pod
func (*HyperClient) DeleteService ¶ added in v0.6.2
func (c *HyperClient) DeleteService(podID string, services []*types.UserService) error
DeleteService deletes user service by podID and service content
func (*HyperClient) GetContainerInfo ¶
func (c *HyperClient) GetContainerInfo(container string) (*types.ContainerInfo, error)
GetContainerInfo gets container info by container name or id
func (*HyperClient) GetContainerList ¶
func (c *HyperClient) GetContainerList() ([]*types.ContainerListResult, error)
GetContainerList gets a list of containers
func (*HyperClient) GetContainerLogs ¶
func (c *HyperClient) GetContainerLogs(container string) ([]byte, error)
GetContainerLogs gets container log by container name or id
func (*HyperClient) GetImageList ¶
func (c *HyperClient) GetImageList() ([]*types.ImageInfo, error)
GetImageList gets a list of images
func (*HyperClient) GetPodInfo ¶
func (c *HyperClient) GetPodInfo(podID string) (*types.PodInfo, error)
GetPodInfo gets pod info by podID
func (*HyperClient) GetPodList ¶
func (c *HyperClient) GetPodList() ([]*types.PodListResult, error)
GetPodList get a list of Pods
func (*HyperClient) GetPodStats ¶ added in v0.6.2
func (c *HyperClient) GetPodStats(podID string) (*types.PodStats, error)
GetPodStats get stats of Pod by podID
func (*HyperClient) GetVMList ¶
func (c *HyperClient) GetVMList() ([]*types.VMListResult, error)
GetVMList gets a list of VMs
func (*HyperClient) Info ¶ added in v0.6.2
func (c *HyperClient) Info() (*types.InfoResponse, error)
Info gets system info of hyperd
func (*HyperClient) ListService ¶ added in v0.6.2
func (c *HyperClient) ListService(podID string) ([]*types.UserService, error)
ListService lists user services by podID
func (*HyperClient) PausePod ¶ added in v0.6.2
func (c *HyperClient) PausePod(podID string) error
PausePod pauses a pod
func (*HyperClient) Ping ¶ added in v0.6.2
func (c *HyperClient) Ping() (*types.PingResponse, error)
Ping checks if hyperd is running (returns 'OK' on success)
func (*HyperClient) PodSignal ¶ added in v0.6.2
func (c *HyperClient) PodSignal(podID string, signal int64) error
PodSignal sends a signal to all containers of specified pod
func (*HyperClient) PostAttach ¶ added in v0.6.2
func (c *HyperClient) PostAttach(id string, tty bool) error
PostAttach attach to a container or pod by id
func (*HyperClient) PullImage ¶ added in v0.6.2
func (c *HyperClient) PullImage(image, tag string, out io.Writer) error
func (*HyperClient) PushImage ¶ added in v0.6.2
func (c *HyperClient) PushImage(repo, tag string, out io.Writer) error
func (*HyperClient) RemoveImage ¶ added in v0.6.2
func (c *HyperClient) RemoveImage(image string) error
func (*HyperClient) RemovePod ¶
func (c *HyperClient) RemovePod(podID string) error
RemovePod removes a pod by podID
func (*HyperClient) RenameContainer ¶ added in v0.6.2
func (c *HyperClient) RenameContainer(oldName string, newName string) error
RenameContainer renames a container
func (*HyperClient) SetPodLabels ¶ added in v0.6.2
SetPodLabels sets labels to Pod by podID
func (*HyperClient) StartPod ¶ added in v0.6.2
func (c *HyperClient) StartPod(podID string) error
StartPod starts a pod by podID
func (*HyperClient) StopPod ¶ added in v0.6.2
func (c *HyperClient) StopPod(podID string) (int, string, error)
StopPod stops a pod
func (*HyperClient) TTYResize ¶ added in v0.8.0
func (c *HyperClient) TTYResize(containerID, execID string, height, width int32) error
TTYResize resizes the tty of the specified container
func (*HyperClient) UnpausePod ¶ added in v0.6.2
func (c *HyperClient) UnpausePod(podID string) error
UnpausePod unpauses a pod
func (*HyperClient) UpdateService ¶ added in v0.6.2
func (c *HyperClient) UpdateService(podID string, services []*types.UserService) error
UpdateService updates user service by podID and service content
type RawExtractor ¶ added in v0.7.0
type RawExtractor struct{}
type StdcopyExtractor ¶ added in v0.7.0
type StdcopyExtractor struct {
// contains filtered or unexported fields
}
type StreamExtractor ¶ added in v0.7.0
func NewExtractor ¶ added in v0.7.0
func NewExtractor(tty bool) StreamExtractor