cpmserverapi

package
v0.0.0-...-1b39373 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2015 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiskDelete

func DiskDelete(w rest.ResponseWriter, r *rest.Request)

func DiskProvision

func DiskProvision(w rest.ResponseWriter, r *rest.Request)

func DockerInspect

func DockerInspect(w rest.ResponseWriter, r *rest.Request)

func DockerRemove

func DockerRemove(w rest.ResponseWriter, r *rest.Request)

func DockerRun

func DockerRun(w rest.ResponseWriter, r *rest.Request)

func DockerStart

func DockerStart(w rest.ResponseWriter, r *rest.Request)

func DockerStop

func DockerStop(w rest.ResponseWriter, r *rest.Request)

func MetricCPU

func MetricCPU(w rest.ResponseWriter, r *rest.Request)

func MetricDf

func MetricDf(w rest.ResponseWriter, r *rest.Request)

func MetricIostat

func MetricIostat(w rest.ResponseWriter, r *rest.Request)

func MetricMEM

func MetricMEM(w rest.ResponseWriter, r *rest.Request)

Types

type DiskDeleteRequest

type DiskDeleteRequest struct {
	Path string
}

type DiskDeleteResponse

type DiskDeleteResponse struct {
	Output string
	Status string
}

func DiskDeleteClient

func DiskDeleteClient(url string, req *DiskDeleteRequest) (DiskDeleteResponse, error)

type DiskProvisionRequest

type DiskProvisionRequest struct {
	Path string
}

type DiskProvisionResponse

type DiskProvisionResponse struct {
	Output string
	Status string
}

func DiskProvisionClient

func DiskProvisionClient(url string, req *DiskProvisionRequest) (DiskProvisionResponse, error)

type DockerInspectRequest

type DockerInspectRequest struct {
	ContainerName string
}

type DockerInspectResponse

type DockerInspectResponse struct {
	IPAddress    string
	RunningState string
}

func DockerInspectClient

func DockerInspectClient(url string, req *DockerInspectRequest) (DockerInspectResponse, error)

type DockerRemoveRequest

type DockerRemoveRequest struct {
	ContainerName string
}

type DockerRemoveResponse

type DockerRemoveResponse struct {
	Output string
}

func DockerRemoveClient

func DockerRemoveClient(url string, req *DockerRemoveRequest) (DockerRemoveResponse, error)

type DockerRunRequest

type DockerRunRequest struct {
	CPU           string
	MEM           string
	ClusterID     string
	ServerID      string
	ProjectID     string
	Image         string
	IPAddress     string
	Standalone    string
	PGDataPath    string
	ContainerName string
	ContainerType string
	CommandOutput string
	CommandPath   string
	EnvVars       map[string]string
}

type DockerRunResponse

type DockerRunResponse struct {
	Output string
}

func DockerRunClient

func DockerRunClient(url string, req *DockerRunRequest) (DockerRunResponse, error)

example:

request := &cpmserverapi.DockerRunRequest{} request.CommandPath = "docker-run.sh" request.CPU = "0" request.MEM = "0" request.Image = "cpm-node" request.PGDataPath = "/tmp/foo" request.ContainerName = "testpoo" envvars := make(map[string]string) envvars["one"] = "uno" request.EnvVars = envvars

type DockerStartRequest

type DockerStartRequest struct {
	ContainerName string
}

type DockerStartResponse

type DockerStartResponse struct {
	Output string
}

func DockerStartClient

func DockerStartClient(url string, req *DockerStartRequest) (DockerStartResponse, error)

type DockerStopRequest

type DockerStopRequest struct {
	ContainerName string
}

type DockerStopResponse

type DockerStopResponse struct {
	Output string
}

func DockerStopClient

func DockerStopClient(url string, req *DockerStopRequest) (DockerStopResponse, error)

type MetricCPURequest

type MetricCPURequest struct {
	Something string
	Other     string
}

type MetricCPUResponse

type MetricCPUResponse struct {
	Output string
}

func MetricCPUClient

func MetricCPUClient(url string, req *MetricCPURequest) (MetricCPUResponse, error)

type MetricDfRequest

type MetricDfRequest struct {
	Something string
	Other     string
}

type MetricDfResponse

type MetricDfResponse struct {
	Output string
}

func MetricDfClient

func MetricDfClient(url string, req *MetricDfRequest) (MetricDfResponse, error)

type MetricIostatRequest

type MetricIostatRequest struct {
	Something string
	Other     string
}

type MetricIostatResponse

type MetricIostatResponse struct {
	Output string
}

func MetricIostatClient

func MetricIostatClient(url string, req *MetricIostatRequest) (MetricIostatResponse, error)

example of calling one of these

request := &cpmserverapi.MetricIostatRequest{"something", "yes"} response, err := cpmserverapi.MetricIostatClient("http://localhost:10001", request)

type MetricMEMRequest

type MetricMEMRequest struct {
	Something string
	Other     string
}

type MetricMEMResponse

type MetricMEMResponse struct {
	Output string
}

func MetricMEMClient

func MetricMEMClient(url string, req *MetricMEMRequest) (MetricMEMResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL