Documentation ¶
Index ¶
- Constants
- type ServerRPC
- func (s *ServerRPC) Attach(stream types.PublicAPI_AttachServer) error
- func (s *ServerRPC) ContainerCreate(ctx context.Context, req *types.ContainerCreateRequest) (*types.ContainerCreateResponse, error)
- func (s *ServerRPC) ContainerInfo(c context.Context, req *types.ContainerInfoRequest) (*types.ContainerInfoResponse, error)
- func (s *ServerRPC) ContainerList(ctx context.Context, req *types.ContainerListRequest) (*types.ContainerListResponse, error)
- func (s *ServerRPC) ContainerLogs(req *types.ContainerLogsRequest, stream types.PublicAPI_ContainerLogsServer) error
- func (s *ServerRPC) ContainerRemove(ctx context.Context, req *types.ContainerRemoveRequest) (*types.ContainerRemoveResponse, error)
- func (s *ServerRPC) ContainerRename(c context.Context, req *types.ContainerRenameRequest) (*types.ContainerRenameResponse, error)
- func (s *ServerRPC) ContainerSignal(ctx context.Context, req *types.ContainerSignalRequest) (*types.ContainerSignalResponse, error)
- func (s *ServerRPC) ContainerStart(ctx context.Context, req *types.ContainerStartRequest) (*types.ContainerStartResponse, error)
- func (s *ServerRPC) ContainerStop(c context.Context, req *types.ContainerStopRequest) (*types.ContainerStopResponse, error)
- func (s *ServerRPC) ExecCreate(ctx context.Context, req *types.ExecCreateRequest) (*types.ExecCreateResponse, error)
- func (s *ServerRPC) ExecSignal(ctx context.Context, req *types.ExecSignalRequest) (*types.ExecSignalResponse, error)
- func (s *ServerRPC) ExecStart(stream types.PublicAPI_ExecStartServer) error
- func (s *ServerRPC) ExecVM(stream types.PublicAPI_ExecVMServer) error
- func (s *ServerRPC) ImageList(ctx context.Context, req *types.ImageListRequest) (*types.ImageListResponse, error)
- func (s *ServerRPC) ImagePull(req *types.ImagePullRequest, stream types.PublicAPI_ImagePullServer) error
- func (s *ServerRPC) ImagePush(req *types.ImagePushRequest, stream types.PublicAPI_ImagePushServer) error
- func (s *ServerRPC) ImageRemove(ctx context.Context, req *types.ImageRemoveRequest) (*types.ImageRemoveResponse, error)
- func (s *ServerRPC) Info(c context.Context, req *types.InfoRequest) (*types.InfoResponse, error)
- func (s *ServerRPC) Log(level hlog.LogLevel, args ...interface{})
- func (s *ServerRPC) LogPrefix() string
- func (s *ServerRPC) Ping(c context.Context, req *types.PingRequest) (*types.PingResponse, error)
- func (s *ServerRPC) PodCreate(ctx context.Context, req *types.PodCreateRequest) (*types.PodCreateResponse, error)
- func (s *ServerRPC) PodInfo(c context.Context, req *types.PodInfoRequest) (*types.PodInfoResponse, error)
- func (s *ServerRPC) PodList(ctx context.Context, req *types.PodListRequest) (*types.PodListResponse, error)
- func (s *ServerRPC) PodPause(ctx context.Context, req *types.PodPauseRequest) (*types.PodPauseResponse, error)
- func (s *ServerRPC) PodRemove(ctx context.Context, req *types.PodRemoveRequest) (*types.PodRemoveResponse, error)
- func (s *ServerRPC) PodSignal(ctx context.Context, req *types.PodSignalRequest) (*types.PodSignalResponse, error)
- func (s *ServerRPC) PodStart(ctx context.Context, req *types.PodStartRequest) (*types.PodStartResponse, error)
- func (s *ServerRPC) PodStats(c context.Context, req *types.PodStatsRequest) (*types.PodStatsResponse, error)
- func (s *ServerRPC) PodStop(ctx context.Context, req *types.PodStopRequest) (*types.PodStopResponse, error)
- func (s *ServerRPC) PodUnpause(ctx context.Context, req *types.PodUnpauseRequest) (*types.PodUnpauseResponse, error)
- func (s *ServerRPC) PortMappingAdd(ctx context.Context, req *types.PortMappingModifyRequest) (*types.PortMappingModifyResponse, error)
- func (s *ServerRPC) PortMappingDel(ctx context.Context, req *types.PortMappingModifyRequest) (*types.PortMappingModifyResponse, error)
- func (s *ServerRPC) PortMappingList(ctx context.Context, req *types.PortMappingListRequest) (*types.PortMappingListResponse, error)
- func (s *ServerRPC) Serve(addr string) error
- func (s *ServerRPC) ServiceAdd(ctx context.Context, req *types.ServiceAddRequest) (*types.ServiceAddResponse, error)
- func (s *ServerRPC) ServiceDelete(ctx context.Context, req *types.ServiceDelRequest) (*types.ServiceDelResponse, error)
- func (s *ServerRPC) ServiceList(ctx context.Context, req *types.ServiceListRequest) (*types.ServiceListResponse, error)
- func (s *ServerRPC) ServiceUpdate(ctx context.Context, req *types.ServiceUpdateRequest) (*types.ServiceUpdateResponse, error)
- func (s *ServerRPC) SetPodLabels(c context.Context, req *types.PodLabelsRequest) (*types.PodLabelsResponse, error)
- func (s *ServerRPC) Stop()
- func (s *ServerRPC) TTYResize(c context.Context, req *types.TTYResizeRequest) (*types.TTYResizeResponse, error)
- func (s *ServerRPC) VMList(ctx context.Context, req *types.VMListRequest) (*types.VMListResponse, error)
- func (s *ServerRPC) Version(c context.Context, req *types.VersionRequest) (*types.VersionResponse, error)
- func (s *ServerRPC) Wait(c context.Context, req *types.WaitRequest) (*types.WaitResponse, error)
Constants ¶
const (
GRPC_API_VERSION = "0.1.0"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerRPC ¶
type ServerRPC struct {
// contains filtered or unexported fields
}
ServerRPC is the main server for gRPC
func NewServerRPC ¶
NewServerRPC creates a new ServerRPC
func (*ServerRPC) Attach ¶ added in v0.6.2
func (s *ServerRPC) Attach(stream types.PublicAPI_AttachServer) error
func (*ServerRPC) ContainerCreate ¶ added in v0.6.2
func (s *ServerRPC) ContainerCreate(ctx context.Context, req *types.ContainerCreateRequest) (*types.ContainerCreateResponse, error)
ContainerCreate creates a container by UserContainer spec
func (*ServerRPC) ContainerInfo ¶
func (s *ServerRPC) ContainerInfo(c context.Context, req *types.ContainerInfoRequest) (*types.ContainerInfoResponse, error)
ContainerInfo gets ContainerInfo by ID or name of container
func (*ServerRPC) ContainerList ¶
func (s *ServerRPC) ContainerList(ctx context.Context, req *types.ContainerListRequest) (*types.ContainerListResponse, error)
ContainerList implements GET /list?item=container
func (*ServerRPC) ContainerLogs ¶
func (s *ServerRPC) ContainerLogs(req *types.ContainerLogsRequest, stream types.PublicAPI_ContainerLogsServer) error
func (*ServerRPC) ContainerRemove ¶ added in v0.8.0
func (s *ServerRPC) ContainerRemove(ctx context.Context, req *types.ContainerRemoveRequest) (*types.ContainerRemoveResponse, error)
func (*ServerRPC) ContainerRename ¶ added in v0.6.2
func (s *ServerRPC) ContainerRename(c context.Context, req *types.ContainerRenameRequest) (*types.ContainerRenameResponse, error)
ContainerRename rename a container
func (*ServerRPC) ContainerSignal ¶ added in v0.8.0
func (s *ServerRPC) ContainerSignal(ctx context.Context, req *types.ContainerSignalRequest) (*types.ContainerSignalResponse, error)
ContainerSignal sends a singal to specified container of specified pod
func (*ServerRPC) ContainerStart ¶ added in v0.8.0
func (s *ServerRPC) ContainerStart(ctx context.Context, req *types.ContainerStartRequest) (*types.ContainerStartResponse, error)
func (*ServerRPC) ContainerStop ¶ added in v0.6.2
func (s *ServerRPC) ContainerStop(c context.Context, req *types.ContainerStopRequest) (*types.ContainerStopResponse, error)
ContainerStop implements POST /container/stop
func (*ServerRPC) ExecCreate ¶ added in v0.6.2
func (s *ServerRPC) ExecCreate(ctx context.Context, req *types.ExecCreateRequest) (*types.ExecCreateResponse, error)
func (*ServerRPC) ExecSignal ¶ added in v0.8.0
func (s *ServerRPC) ExecSignal(ctx context.Context, req *types.ExecSignalRequest) (*types.ExecSignalResponse, error)
ExecSignal sends a singal to specified exec of specified container
func (*ServerRPC) ExecStart ¶ added in v0.6.2
func (s *ServerRPC) ExecStart(stream types.PublicAPI_ExecStartServer) error
func (*ServerRPC) ExecVM ¶ added in v0.8.0
func (s *ServerRPC) ExecVM(stream types.PublicAPI_ExecVMServer) error
func (*ServerRPC) ImageList ¶
func (s *ServerRPC) ImageList(ctx context.Context, req *types.ImageListRequest) (*types.ImageListResponse, error)
ImageList implements GET /images/get
func (*ServerRPC) ImagePull ¶ added in v0.6.2
func (s *ServerRPC) ImagePull(req *types.ImagePullRequest, stream types.PublicAPI_ImagePullServer) error
ImagePull pulls a image from registry
func (*ServerRPC) ImagePush ¶ added in v0.6.2
func (s *ServerRPC) ImagePush(req *types.ImagePushRequest, stream types.PublicAPI_ImagePushServer) error
ImagePush pushes a local image to registry
func (*ServerRPC) ImageRemove ¶ added in v0.6.2
func (s *ServerRPC) ImageRemove(ctx context.Context, req *types.ImageRemoveRequest) (*types.ImageRemoveResponse, error)
ImageRemove deletes a image from hyperd
func (*ServerRPC) Info ¶ added in v0.6.2
func (s *ServerRPC) Info(c context.Context, req *types.InfoRequest) (*types.InfoResponse, error)
Info gets CmdSystemInfo
func (*ServerRPC) Log ¶ added in v1.0.0
Log() employ `github.com/hyperhq/hypercontainer-utils/hlog.HLog` to add pod information to the log
func (*ServerRPC) LogPrefix ¶ added in v1.0.0
LogPrefix() belongs to the interface `github.com/hyperhq/hypercontainer-utils/hlog.LogOwner`, which helps `hlog.HLog` get proper prefix from the owner object.
func (*ServerRPC) Ping ¶ added in v0.6.2
func (s *ServerRPC) Ping(c context.Context, req *types.PingRequest) (*types.PingResponse, error)
Ping checks if hyperd is running (returns 'OK' on success)
func (*ServerRPC) PodCreate ¶
func (s *ServerRPC) PodCreate(ctx context.Context, req *types.PodCreateRequest) (*types.PodCreateResponse, error)
PodCreate creates a pod by PodSpec
func (*ServerRPC) PodInfo ¶
func (s *ServerRPC) PodInfo(c context.Context, req *types.PodInfoRequest) (*types.PodInfoResponse, error)
PodInfo gets PodInfo by podID
func (*ServerRPC) PodList ¶
func (s *ServerRPC) PodList(ctx context.Context, req *types.PodListRequest) (*types.PodListResponse, error)
PodList implements GET /list?item=pod
func (*ServerRPC) PodPause ¶ added in v0.6.2
func (s *ServerRPC) PodPause(ctx context.Context, req *types.PodPauseRequest) (*types.PodPauseResponse, error)
PodPause pauses a pod
func (*ServerRPC) PodRemove ¶
func (s *ServerRPC) PodRemove(ctx context.Context, req *types.PodRemoveRequest) (*types.PodRemoveResponse, error)
PodRemove removes a pod by podID
func (*ServerRPC) PodSignal ¶ added in v0.6.2
func (s *ServerRPC) PodSignal(ctx context.Context, req *types.PodSignalRequest) (*types.PodSignalResponse, error)
PodSignal sends a singal to all containers of specified pod
func (*ServerRPC) PodStart ¶ added in v0.6.2
func (s *ServerRPC) PodStart(ctx context.Context, req *types.PodStartRequest) (*types.PodStartResponse, error)
PodStart starts a pod by podID
func (*ServerRPC) PodStats ¶ added in v0.6.2
func (s *ServerRPC) PodStats(c context.Context, req *types.PodStatsRequest) (*types.PodStatsResponse, error)
PodStats get stats (runvtypes.PodStats) of Pod
func (*ServerRPC) PodStop ¶ added in v0.6.2
func (s *ServerRPC) PodStop(ctx context.Context, req *types.PodStopRequest) (*types.PodStopResponse, error)
PodStop stops a pod
func (*ServerRPC) PodUnpause ¶ added in v0.6.2
func (s *ServerRPC) PodUnpause(ctx context.Context, req *types.PodUnpauseRequest) (*types.PodUnpauseResponse, error)
PodUnpause unpauses a pod
func (*ServerRPC) PortMappingAdd ¶ added in v1.0.0
func (s *ServerRPC) PortMappingAdd(ctx context.Context, req *types.PortMappingModifyRequest) (*types.PortMappingModifyResponse, error)
PortMappingAdd add a list of PortMapping rules to a Pod
func (*ServerRPC) PortMappingDel ¶ added in v1.0.0
func (s *ServerRPC) PortMappingDel(ctx context.Context, req *types.PortMappingModifyRequest) (*types.PortMappingModifyResponse, error)
PortMappingDel remove a list of PortMapping rules from a Pod
func (*ServerRPC) PortMappingList ¶ added in v1.0.0
func (s *ServerRPC) PortMappingList(ctx context.Context, req *types.PortMappingListRequest) (*types.PortMappingListResponse, error)
PortMappingList get a list of PortMappings
func (*ServerRPC) ServiceAdd ¶ added in v0.6.2
func (s *ServerRPC) ServiceAdd(ctx context.Context, req *types.ServiceAddRequest) (*types.ServiceAddResponse, error)
ServiceAdd implements POST /service/list
func (*ServerRPC) ServiceDelete ¶ added in v0.6.2
func (s *ServerRPC) ServiceDelete(ctx context.Context, req *types.ServiceDelRequest) (*types.ServiceDelResponse, error)
ServiceDelete implements DELETE /service
func (*ServerRPC) ServiceList ¶ added in v0.6.2
func (s *ServerRPC) ServiceList(ctx context.Context, req *types.ServiceListRequest) (*types.ServiceListResponse, error)
ServiceList implements GET /service/list
func (*ServerRPC) ServiceUpdate ¶ added in v0.6.2
func (s *ServerRPC) ServiceUpdate(ctx context.Context, req *types.ServiceUpdateRequest) (*types.ServiceUpdateResponse, error)
ServiceUpdate implements UPDATE /service
func (*ServerRPC) SetPodLabels ¶ added in v0.6.2
func (s *ServerRPC) SetPodLabels(c context.Context, req *types.PodLabelsRequest) (*types.PodLabelsResponse, error)
PodLabels sets the labels of Pod
func (*ServerRPC) TTYResize ¶ added in v0.8.0
func (s *ServerRPC) TTYResize(c context.Context, req *types.TTYResizeRequest) (*types.TTYResizeResponse, error)
TTYResize resizes the tty of the specified container
func (*ServerRPC) VMList ¶
func (s *ServerRPC) VMList(ctx context.Context, req *types.VMListRequest) (*types.VMListResponse, error)
VMList implements GET /list?item=vm
func (*ServerRPC) Version ¶ added in v0.6.2
func (s *ServerRPC) Version(c context.Context, req *types.VersionRequest) (*types.VersionResponse, error)
Version gets the version and apiVersion of hyperd
func (*ServerRPC) Wait ¶ added in v0.6.2
func (s *ServerRPC) Wait(c context.Context, req *types.WaitRequest) (*types.WaitResponse, error)
Wait gets exitcode by container and processId