Documentation
¶
Index ¶
- Constants
- type ExtendResource
- type HTTPRequest
- type HTTPResponse
- type ImagePrePullJobRequest
- type ImagePrePullJobResponse
- type NodePreCheckRequest
- type NodeStatusRequest
- type NodeTaskRequest
- type NodeTaskResponse
- type NodeUpgradeJobRequest
- type NodeUpgradeJobResponse
- type ObjectResp
- type PodStatusRequest
- type RestartResponse
Constants ¶
const ( HeaderAuthorization = "Authorization" HeaderNodeName = "NodeName" HeaderExtKeyUsages = "ExtKeyUsages" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtendResource ¶
type ExtendResource struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Capacity resource.Quantity `json:"capacity,omitempty"`
}
ExtendResource is the extended resource detail that comes from edge
type HTTPRequest ¶
type HTTPRequest struct {
Header http.Header `json:"header"`
Body []byte `json:"body"`
Method string `json:"method"`
URL string `json:"url"`
}
HTTPRequest is used structure used to unmarshal message content from cloud
type HTTPResponse ¶
type HTTPResponse struct {
Header http.Header `json:"header"`
StatusCode int `json:"status_code"`
Body []byte `json:"body"`
}
HTTPResponse is HTTP request's response structure used to send response to cloud
type ImagePrePullJobRequest ¶
type ImagePrePullJobRequest struct {
Images []string
NodeName string
Secret string
RetryTimes int32
CheckItems []string
}
ImagePrePullJobRequest is image prepull msg from cloud to edge
type ImagePrePullJobResponse ¶
type ImagePrePullJobResponse struct {
NodeName string
State string
Reason string
ImageStatus []v1alpha1.ImageStatus
}
ImagePrePullJobResponse is used to report status msg to cloudhub https service from each node
type NodePreCheckRequest ¶
type NodePreCheckRequest struct {
CheckItem []string
}
NodePreCheckRequest is pre-check msg coming from cloud to edge
type NodeStatusRequest ¶
type NodeStatusRequest struct {
UID types.UID
Status v1.NodeStatus
ExtendResources map[v1.ResourceName][]ExtendResource
}
NodeStatusRequest is Message.Content which comes from edge
type NodeTaskRequest ¶
type NodeTaskResponse ¶
type NodeTaskResponse struct {
// NodeName is the name of edge node.
NodeName string
// State represents for the upgrade state phase of the edge node.
// There are several possible state values: "", Upgrading, BackingUp, RollingBack and Checking.
State api.State
// Event represents for the event of the ImagePrePullJob.
// There are three possible event values: Init, Check, Pull.
Event string
// Action represents for the action of the ImagePrePullJob.
// There are three possible action values: Success, Failure, TimeOut.
Action api.Action
// Reason represents for the reason of the ImagePrePullJob.
Reason string
// Time represents for the running time of the ImagePrePullJob.
Time string
ExternalMessage string
}
type NodeUpgradeJobRequest ¶
type NodeUpgradeJobRequest struct {
UpgradeID string
HistoryID string
Version string
UpgradeTool string
Image string
}
NodeUpgradeJobRequest is upgrade msg coming from cloud to edge
type NodeUpgradeJobResponse ¶
type NodeUpgradeJobResponse struct {
UpgradeID string
HistoryID string
NodeName string
FromVersion string
ToVersion string
Status string
Reason string
}
NodeUpgradeJobResponse is used to report status msg to cloudhub https service
type ObjectResp ¶
ObjectResp is the object that api-server response
type PodStatusRequest ¶
PodStatusRequest is Message.Content which comes from edge