Documentation
¶
Overview ¶
example of calling one of these
request := &cpmserverapi.MetricIostatRequest{"something", "yes"} response, err := cpmserverapi.MetricIostatClient("http://localhost:10001", request)
Package cpmserverapi is the implementation of the CPM Server Administration REST API. There is a single CPM server admin server running on each CPM server which monitors the physical server and also performs volume mgmt and Docker API work based on CPM user interface actions.
Index ¶
- Constants
- func DiskDelete(w rest.ResponseWriter, r *rest.Request)
- func DiskProvision(w rest.ResponseWriter, r *rest.Request)
- func MetricCPU(w rest.ResponseWriter, r *rest.Request)
- func MetricDf(w rest.ResponseWriter, r *rest.Request)
- func MetricIostat(w rest.ResponseWriter, r *rest.Request)
- func MetricMEM(w rest.ResponseWriter, r *rest.Request)
- func Status(w rest.ResponseWriter, r *rest.Request)
- type DiskDeleteRequest
- type DiskDeleteResponse
- type DiskProvisionRequest
- type DiskProvisionResponse
- type MetricCPURequest
- type MetricCPUResponse
- type MetricDfRequest
- type MetricDfResponse
- type MetricIostatRequest
- type MetricIostatResponse
- type MetricMEMRequest
- type MetricMEMResponse
- type SwitchPathRequest
- type SwitchPathResponse
Constants ¶
const PORT = ":10001"
const URL = "http://"
Variables ¶
This section is empty.
Functions ¶
func DiskDelete ¶
func DiskDelete(w rest.ResponseWriter, r *rest.Request)
DiskDelete delete a data directory on a server
func DiskProvision ¶
func DiskProvision(w rest.ResponseWriter, r *rest.Request)
DiskProvision cause a data directory to be created on the server
func MetricCPU ¶
func MetricCPU(w rest.ResponseWriter, r *rest.Request)
MetricCPU obtain the cpu metrics and return the results
func MetricDf ¶
func MetricDf(w rest.ResponseWriter, r *rest.Request)
MetricDf perform the df command and return the results
func MetricIostat ¶
func MetricIostat(w rest.ResponseWriter, r *rest.Request)
MetricIostat perform the iostat command and return the results
Types ¶
type DiskDeleteRequest ¶
type DiskDeleteRequest struct {
Path string
}
type DiskDeleteResponse ¶
func DiskDeleteClient ¶
func DiskDeleteClient(serverName string, req *DiskDeleteRequest) (DiskDeleteResponse, error)
DiskDeleteClient client for deleting a directory on the host
type DiskProvisionRequest ¶
type DiskProvisionRequest struct {
Path string
}
type DiskProvisionResponse ¶
func DiskProvisionClient ¶
func DiskProvisionClient(serverName string, req *DiskProvisionRequest) (DiskProvisionResponse, error)
DiskProvisionClient client for provisioning a new directory on the host
type MetricCPURequest ¶
type MetricCPUResponse ¶
type MetricCPUResponse struct {
Output string
}
func MetricCPUClient ¶
func MetricCPUClient(serverID string, req *MetricCPURequest) (MetricCPUResponse, error)
MetricCPUClient client for getting the cpu metrics
type MetricDfRequest ¶
type MetricDfResponse ¶
type MetricDfResponse struct {
Output string
}
func MetricDfClient ¶
func MetricDfClient(serverID string, req *MetricDfRequest) (MetricDfResponse, error)
MetricDfClient perform a df command on the host and return the results of it
type MetricIostatRequest ¶
type MetricIostatResponse ¶
type MetricIostatResponse struct {
Output string
}
func MetricIostatClient ¶
func MetricIostatClient(serverID string, req *MetricIostatRequest) (MetricIostatResponse, error)
MetricIostatClient perform an iostat on the host and return the results of it
type MetricMEMRequest ¶
type MetricMEMResponse ¶
type MetricMEMResponse struct {
Output string
}
func MetricMEMClient ¶
func MetricMEMClient(serverID string, req *MetricMEMRequest) (MetricMEMResponse, error)
MetricMEMClient client for getting the memory metrics